简体   繁体   English

有什么方法可以在 CloudHub 上部署的 Mule 中创建动态调度程序作业(流)?

[英]Is there any way to create dynamic scheduler jobs (flows) in Mule deployed on CloudHub?

We have a scheduler flow already which runs on some times specified.我们已经有一个调度程序流,它在指定的某些时间运行。 Now for a new client we need the same flow to work.现在对于一个新客户,我们需要相同的流程来工作。

Without having to add a new scheduler and duplicate the scheduler component with new details, is there any way to dynamically create those in Mule without redeploying the application?无需添加新的调度程序并使用新的详细信息复制调度程序组件,有没有办法在 Mule 中动态创建它们而无需重新部署应用程序? Or any other ways to achieve the functionality?或者任何其他方式来实现该功能?

There is no out of the box way to create dynamically schedulers in Mule 4. An alternative is to develop your own message source in a custom connector to trigger the flow using the Mule Java SDK.在 Mule 4 中没有开箱即用的方法来创建动态调度程序。另一种方法是在自定义连接器中开发自己的消息源,以使用 Mule Java SDK 触发流。 Note that your custom connector will not be recognized as a scheduler in CloudHub UI.请注意,您的自定义连接器不会被识别为 CloudHub UI 中的调度程序。 If you want to be able to manage you will have to implement an alternative.如果您希望能够进行管理,则必须实施替代方案。

What you are trying to achieve is not possible solely using Mule 4 or CloudHub.仅使用 Mule 4 或 CloudHub 无法实现您想要实现的目标。 However, you can meet your requirement by combining with a scheduler service from any cloud provider.但是,您可以通过结合任何云提供商的调度程序服务来满足您的要求。 For example AWS's Amazon event bridge or GCP's Cloud Scheduler例如 AWS 的Amazon 事件桥或 GCP 的Cloud Scheduler

So, in your Mule APP, you will replace your scheduler with an HTTP Listener ( <http:listener> ).因此,在您的 Mule APP 中,您将使用 HTTP 侦听器 ( <http:listener> ) 替换scheduler Then, in your scheduler service, add a scheduler and configure it to send POST request to this HTTP endpoint.然后,在您的调度程序服务中,添加一个调度程序并将其配置为将POST请求发送到此 HTTP 端点。 This POST request can have the required data that your mule app will need to identify the client, and perform customized action based on it.此 POST 请求可以包含您的 mule 应用程序识别客户端所需的数据,并基于它执行自定义操作。 This way, whenever you want to add another client, you can just create a new scheduler in your cloud provider without needing to touch the mule application.这样,每当您想添加另一个客户端时,您只需在您的云提供商中创建一个新的调度程序,而无需接触 mule 应用程序。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 cloudhub 上的连接超时错误:Mule 版本:4.2.2 - Connect Timeout Error on cloudhub : Mule version:4.2.2 无法使用 Gradle 部署到 cloudhub mule4 应用程序 - Unable to deploy to cloudhub mule4 application with Gradle Mule 4 从 Cloudhub usinf 文件连接器上的 /tmp 目录写入和读取? - Mule 4 Write and Read from /tmp directory on Cloudhub usinf File Connector? 如何创建键值对窗口以在 mule 自定义连接器中添加动态属性,目前使用 mule 3 - How to create key value pair window to add dynamic properties in mule custom connector , currently using mule 3 CloudHub 部署 502 Bad Gateway 我们找不到任何 Cloudhub 应用程序正在侦听此 API - CloudHub Deployment 502 Bad Gateway We couldn't find any Cloudhub application listening on this API 在 mulesoft 中调用流的 mule 推荐方法是什么? - What is the mule recommended method to invoke flows in mulesoft? 我们可以在 Mulesoft 中为 cloudhub 应用程序创建域项目吗? 如果不是,为什么? - Can we create domain project for cloudhub applications in Mulesoft? if not, why? 骡子 4 中的动态 function 调用 - Dynamic function call in mule 4 部署到 Cloudhub,具有 Salesforce 创建连接器的 Munit 测试失败 - Deploying to Cloudhub, Munit tests fails that has Salesforce create connector 由于对业务组的访问权限,使用 Mule Maven 插件将 Cloudhub 部署到业务组失败 - Cloudhub deployment to Business Group failure using Mule Maven Plugin due to access rights to business group
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM