Get a list of external task subscribers

Hi

We’re using external tasks to jump out of Camunda to our back end services etc. To acheive this we use node js service which use the REST API to subscribe to the various topics.

Is there any way (preferably via the REST API) to see which topics have subscribers? I can use /external-tasks/ to see active calls, but can’t see how to view the subscriptions?

TIA

Simon

Hi @SimonHickling
What do you mean when you say subscribers? do you mean tasks that are locked to a worker?

THanks for the prompt response @Niall

We’re using the external task client to subscribe to topics. We’d like to see which subscribers are registered.

So what is it you’d like to see? LIke a list of the ID’s of the workers that are currently subscribing for a topic?

I think it’s the topics and associated subscribers.

Sure thing, you can use this REST call to return all current tasks, topics and worker id’s for each.

Ah, that’s not quite right - I’ve looked at that ans it only seems to be for “active” tasks not for inactive subscriptions I may have misunderstood what you meant by workers.

When I fire up my node app I subscribe, but that API call doesn’t return anything until the external task is called and then only returns active tasks

I completely understand now!
List of subscribers and what exactly they’re subscribing to, nothing to do with what tasks are available.
Unfortunately i don’t think we persist this information in our database, which mean we wouldn’t be able to retrieve it.
I really like the idea though and i think it’s work creating a feature request for this. If you have time, feel free to create a ticket here: https://jira.camunda.com/
and post the ticket so that other people who find this post can upvote the feature as well.

OK - Thanks for confirming, Niall. I’ll create a ticket. In the meantime, we’ll probably manage it from the subscribers emitting some kind of message.

Yeah, there are a lot of ways to see the current subscribers outside the context of Camunda and it all depends on your current architecture.
One way i can think of is being able to use some service management tooling that can give you an overview of all the services in your network. I guess using message events would be a good start.

I believe the external task client is a bit misleading here. If suggests that a registration of the worker on the server happens when the subscribe method is called. However, this is not the case. The workerId only becomes known to the process engine when an external task is fetched and locked. Camunda will allow to fetch and lock a task without previously “subscribing” to a topic.