Eager Workflow Start requires shared client connection between starter and worker
warningEWS requires the worker and starter to share a client connection to discover each other, meaning they must run in the same process and share a common lifecycle. This is a significant architectural constraint that differs from traditional Temporal deployment patterns.
The worker and starter must share a single Temporal client connection and run in the same process. The worker must be started in non-blocking mode before the workflow is initiated.
1. Refactor application architecture to collocate starter and worker in the same process. 2. Create a single shared Temporal client instance. 3. Initialize worker using the shared client before starting workflows. 4. Use worker.Start() instead of worker.Run() to start in non-blocking mode. 5. Set up OnFatalError handler to manage worker errors appropriately. 6. Ensure proper lifecycle management so worker is available when starter needs it. 7. Test fallback behavior when worker is not available.