Multiple server environments with RabbitMQ and Celery

I have a Django-based service with Celery, using RabbitMQ as the broker. I want to install several environments on the same machine.

What's the best way of configuring Celery for each environment? Give each environment its own virtual host, so the Test environment will use ampq://celery:celery@localhost:5672/test and the Dev environment will use ampq://celery:celery@localhost:5672/dev?

Or use the same RabbitMQ virtual host and direct each environment to different queues - so that the dev environment's default queue is and the test environment's default queue is default.test?

Or set up two RabbitMQ instances?


Setting up 2 RMQ vhosts is the way to do it.

With only 1 vhost and using 2 queues you can send tasks to the environment you decide, but the control commands (shutdown, inspect, etc) will be sent to all the workers. If you use different vhosts the control commands will work as expected.

Need Your Help

stl map const_iterator and g++ error

mfc g++ cstring

I'm trying to port some windows"s MFC class to linux because I have to port a windows software to linux.

Django: Best way to highlight primary/favorite relation in ManyToMany relationship

django django-models foreign-keys many-to-many

What is the best way to highlight a specific relationship in a ManyToMany relationship in django?