Unsure if this is the right place to ask, but I’m working in a monorepo and have some questions about how temporal worker’s handle workflows and activities. Idea is that the directory structure looks something like this:
My understanding is that I need to spin up workers in each of the services, as well as workers in my temporalWorkflows service. The worker in the temporalWorkflows service will be the one executing the workflows, while the workers in each of the services will be the ones executing the activities. Basically, I’d like to guarantee that the activities are executed within the service that they’re from. I plan on configuring these by registering each activity to its own taskQueue, and the workflow to another taskQueue. I’ll also then have a worker for each task queue. Is there a simpler or alternative way of doing this that I’m not seeing, or is this the way to work with temporalWorkflows that use activities across services?
monorepo/
– volumeService/
---- volumeActivity.ts
– perimeterService/
---- perimeterActivity.ts
– temporalWorkflows/
---- workflow.ts