Is there any way to dynamically inject/pass the activity task queue name into the workflow? from what i read (correct me if i am wrong) it looks like you can not do dependency injection on the workflow class and also the activity stubs (where you define the task queue name) have to be created inside the workflow class.
Here is my use case: I have a integration test that spins up a service and runs tests on it. Each time it spins up a service i want to make sure that it is using a unique task queue so that tests dont interfere with each other.
Just to be clear, you want an external way to control the task queue that workflow invokes an activity with? I could be misreading this but if so here is an example:
To make this work for you, just add another parameter to the workflow for the task queue.
Thanks @ryland. Since we cannot directly inject into the workflow, the 2 ways to do this seem to be 1) get it as a param to the workflow or 2) create a new dummy activity who is responsible for returning the actual activity config. I like option 2 better and will go that route.
By default, activity taks queue name is the same as the workflow task queue name. Each of your runs can specify a different task queue name when starting a workflow and starting the worker.