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?
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.
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.