Is there a way to query on what all task queues, worker registered a workflow?

Hi Team, We have a use case where we want to execute a command on multiple hosts at once. On each host we have worker running. We will have unique instance id which we can use in task queue name to make every worker poll on different task queue so if same Workflow is placed on that specific task queue, we can guarantee only worker listening on that task queue will execute it. Now our problem statement is, to start workflow and put it in that specific task queue we don’t know the instance id prior, that will be known to only worker, is there a way to fetch all task queue names where workers are running and start workflow dynamically?

Currently, there is no way to list all task queues. We are considering adding such APIs in the future.

A possible workaround is to have a workflow that keeps track of the workers. Then, a worker signals this workflow at start and shutdown. The manager workflow can have logic to check if a worker is still running by calling describe (using an activity) on the worker-specific task queue.

1 Like