Worker Versioning feature to cater to different namespaces

Can the Worker Versioning feature in Temporal be used to connect a new worker version to a different namespace?

I am planning to migrate in-flight workflows from an existing namespace to a newly created one on the same Temporal cluster. To achieve a seamless migration, I want to:

  • Keep older worker versions connected to the original namespace to complete existing long running workflows.

  • Deploy newer worker versions connected to the new namespace to handle all future workflows.

I’ve seen older community discussions where users built Temporal applications that connect to multiple namespaces. Is it possible (and supported) to combine this pattern with Worker Versioning so that versioned workers are bound to specific namespaces, enabling a seamless namespace migration?

Hi,

Not sure if worker versioning is intended for this purpose, but I think it will work. You won’t be able to migrate workflows from one version to another.

You can also use the visibility API to query running workflows and shutdown old workers once they all are completed.

1 Like

Hi,

If you’re worried that workers of the new namespace polling tasks of workflows running in the old namespace (or vice versa), no need to worry as task queues are scoped within a namespace. This is true with or without using Worker Versioning.

1 Like

Thanks for the inputs. We will do a POC on it and share our learnings.