You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you may now, the redis transport requires that each worker needs to have a unique connection consumer name. The suggested and very easy solution is to use the HOSTNAME env variable. This works perfectly in production where we use containerization via Docker, but there is a small issue when developing locally and not inside a devcontainer:
When developing locally in my WSL instance, for some reason the HOSTNAME env variable is empty when I try to use it via the '%env(HOSTNAME)%' notation in the Yaml configuration, even though the env variable does exist.
A tiny quality of life improvement would be to allow setting the consumer name to a generated random value.
AFAIK the consumer names dont have to be stable, so this would simplify configuration quite a bit when having multiple workers work on a single queue or multiple queues.
Description
As you may now, the redis transport requires that each worker needs to have a unique connection consumer name. The suggested and very easy solution is to use the
HOSTNAME
env variable. This works perfectly in production where we use containerization via Docker, but there is a small issue when developing locally and not inside a devcontainer:When developing locally in my WSL instance, for some reason the
HOSTNAME
env variable is empty when I try to use it via the'%env(HOSTNAME)%'
notation in the Yaml configuration, even though the env variable does exist.A tiny quality of life improvement would be to allow setting the consumer name to a generated random value.
AFAIK the consumer names dont have to be stable, so this would simplify configuration quite a bit when having multiple workers work on a single queue or multiple queues.
Example
and then
The text was updated successfully, but these errors were encountered: