I suggest using a single storage for all your queues. If that's feasible, use a common Redis instance to work your queues. As far as distribution is concerned, if need be, Redis has good clustering support.
Queueing in a multi-tenancy application
Hi Everyone.
At the company I work for we are building out a multi-tenancy application but we have stumbled on a bit of a tough issue.
Currently the env is loaded when the site is requested. It checks the (domain) url and returns the correct environment variables for that domain. Now the problem we have is that we are using the queue for time-consuming tasks, but since our env is loaded per domain, the queue isn't using the correct database when running because it does not know about which domain it is on.
Does anyone have experienced this problem before? Any solutions or ideas ?
Thanks in advance!
Configure all your domains with the same Redis instance but different queue names.
Once you run the listener/worker/supervisor it'll be listening on the Redis port (default: 6379). You can use different queues by prepending the domain names to a common term, like: domain-1-redis-queue, domain-2-redis-queue, domain-3-redis-queue etc.
This way all your domains will have their own 'pipes' to push jobs through, so to speak.
Please or to participate in this conversation.