[workflows] Segregate Jetstream consumer and producer creation/migration
Description
The current NATS migration logic does not account for whether the service is a producer (server) or a consumer (worker), which leads to a race condition on startup if both services are started with automigrate since the consumer upsert logic is not atomic.
To solve this issue, the --automigrate flag should be made contextual whether you run server or worker command.
The current NATS migration logic does not account for whether the service is a producer (server) or a consumer (worker), which leads to a race condition on startup if both services are started with automigrate since the consumer upsert logic is not atomic.
To solve this issue, the --automigrate flag should be made contextual whether you run server or worker command.