Camunda external-task-client for Javascript best approach to multiple topics


We are working with external implementation and I was wondering about best practices.
Regarding the camunda-external-task-client npm package; Should I use a single client instance for subscribing to multiple topics? Or should I use a client instance for subscribing to each topic?

We have a scenario where we are deploying a process with several tasks(nearly all tasks)that have an external implementation. And we want to have a clustered node application subscribe to all the topics from that process.

Thank you for your time!


It’s usually a good idea to define a single service with multiple topics to subscribe to.
Otherwise services will end up being too granular.


@Niall you mean one worker thread can subscribe to multiple topic?

In case of parallel execution the token arrive at two activities and both of the activity are external task . In that case subscribing to multiple task in same worker thread will be waiting state for other external task till the current execution completes.