How to isolate a Subscribe Channel Listener to only one worker

162 Views Asked by At

I have an api created in mulesoft which currently has 7 workers. This api has a connection to Salesforce in which it has a subscriber channel listener directly to a streaming channel in SF. Like so:

Flow that i am talking about

And my problem is that since i have 7 workers in the api ( and i cannot change it to 1 or less then 7) all of the 7 workers will listen to this event.

Notice that in the flow we have a choice, which makes only the worker 0 will continue processing until the end of the flow. But the number of platform events from the streaming channel will always be x7 because even if we receive one message all of the workers will be listening and receive it even though that only worker 0 will process it.

That makes my Salesforce statistic go very bad because I have a limit for daily platform events. And I surpass that value very quickly because its being always multiplies by 7.

Do you have any idea how can change this and make only one worker be listening to the subscriber?

My current plan is to create an api specific to just subscribe listen with just one worker an then send a request to process in this api that i currently have. But this sounds very sketchy to me.

1

There are 1 best solutions below

0
aled On

It is not possible in CloudHub.