Do i need to define 2 workers(one for each node)? Can i use same queue to accommodate all 6 tasks
Each binary would contain a single worker. Each worker has to use a different task queue. You have to specify an appropriate task queue when scheduling tasks from a workflow.
The general rule is that all workers that share a task queue must support the same set of workflow and activity types.
So, I have to add one worker(with unique queue name) and one workflow implementation class in each binary
In the workflow initiator:
i) I have to build these 6 workflows
ii) Build these 6 workflows in sequence order(I want binaries to run in sequence, but not concurrent)
In each binary, I would have two workers. One worker just for the workflow code. All binaries would have this worker as we want workflows to run across all of them (unless you want to limit workflow code to a subset of workers). Another worker would contain a subset of activities and have a different task queue for each subset.
In the workflow initiator:
i) I have to build these 6 workflows
ii) Build these 6 workflows in sequence order(I want binaries to run in sequence, but not concurrent)
I don’t understand what “build workflows” means. We don’t have such a concept in Temporal. Do you mean “start workflows”?
Below is my understanding(based on example provided by temporal)
→ Workflow initiator will open up queue and wait for worker(s) to take queue
→ Worker will register its workflow to the queue
→ Workflow initiator triggers worker code
For my requirement(mentioned in the original post), I tried below options
→ Created one binary to initiate workflow. Created 2 worker binaries with same workflow and queue name but different implementation in each worker. But workflow initiator is picking one of the worker only
→ Created one binary to initiate workflow. Created 2 worker binaries with same workflow, but different queue name and implementation in each worker. In Workflow initiator i wrote code as below. It is triggering both worker codes same time with independent run id