I have a single workflow with multiple activities and multiple workers deployed as Spring boot pods.
1st activity generates a file on local disk and can run on any worker, but the subsequent activities which process and upload the file to server must run on the same worker (as file path is local to worker node’s disk).
I see samples-java/core/src/main/java/io/temporal/samples/fileprocessing at main · temporalio/samples-java · GitHub which does something similar by dynamically generating host specific task queues.
Is there any example on how to adapt this to use with Spring boot by injecting some custom bean perhaps? I don’t want to start worker as a separate process from the spring boot server as I don’t want to lose on some Spring specific features.
What I tried?
I did try defining 2 different Worker beans workerForCommonTaskQueue and workerForHostSpecificTaskQueue but am not sure how to ensure one of them starts the worker factory.