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? Or any other ways to achieve the functionality?
What you are trying to achieve is not possible solely using Mule 4 or 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
So, in your Mule APP, you will replace your
scheduler
with an HTTP Listener (<http:listener>
). Then, in your scheduler service, add a scheduler and configure it to sendPOST
request to this HTTP endpoint. 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. 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.