External Task Client subscription

Hello dear Camunders,

Do I understand it correctly that it is currently not possible to subscriber to multiple topics similiar to external task?:

 List<LockedExternalTask> tasks = externalTaskService.fetchAndLock(10, "externalWorkerId")

.topic(“AddressValidation”, 60L * 1000L)
.execute();

for (LockedExternalTask task : tasks) {

Perhaps a solution would be a loop for subscriptions

thank you

If you want to write a worker that can subscribe to more than one topic you can do that my using the external task client.

1 Like

Hi @Niall
I wasn’t probably that precise in my comment.
My intention was to process multiple topics in parallel.
Thanks for the link. I found there this answer
https://github.com/camunda/camunda-external-task-client-java/issues/16

Edit:
to explain my scenario and maybe incorrect understanding how external client works:
I have task which might take hours to complete so in this case client is gonna be occupied by one task and therefore I do understand other topics needs to wait thus the solution might be to have multiple clients but in this scenario I am afraid a server might get slow down by frequent polling

M.

Hi Guys,

sorry for bringing this again, but I am bit confused about external pattern despite I have read about it.

External task https://docs.camunda.org/manual/7.10/user-guide/process-engine/external-tasks/ gives a list of task based on I can work on if I understand it correctly
Then there is https://docs.camunda.org/manual/7.10/user-guide/ext-client/ client which handles external tasks.

I can implement very easily the client.
But in my case I have ~50 external tasks (one server) and a majority of them are long-running (60s and more) and they can be triggered concurrently.

In docs there is mentioned

As the external task clients didn’t use any threading internally, you should start as many clients as needed and balance the load with your operating system.

So my understanding is that I do either create multiple external applications for each external task or a multithread application.

I am sorry for such beginners questions. But asking here might save me time on developing.

Best regards,

M

Indeed, you can create as many independent external task clients as you need. You can have multiple clients subscribed to the same topic. You could have a one client for each topic or you could even have a small number of clients what each subscribe to multiple topics.

Hi @Niall,
Could you please look into this issue of External Task!