Is it possible to run more than one rabbitmq instance on one machine?

This thread appears to detail what you need. From the thread responses (scroll down):

The following settings are necessary to separate the node runtimes completely, while allowing them to share the installed code base.

RABBITMQ_CONFIG_FILE /etc/rabbitmq/rabbitmq

RABBITMQ_MNESIA_BASE /var/lib/rabbitmq/mnesia

RABBITMQ_LOG_BASE /var/log/rabbitmq

RABBITMQ_ENABLED_PLUGINS_FILE /etc/rabbitmq/enabled_plugins


Now the official RabbitMQ documentation contains a section "A Cluster on a Single Machine", which describes how to run multiple Rabbit nodes on a single machine.

See https://www.rabbitmq.com/clustering.html#single-machine


One approach that I took when testing out clustering on my dev machine was to fire up several VMs. I had several for Rabbit and one for HAProxy.

While you can, as per one of the other answers, run multiple instances on a single OS instance, the multiple VM approach allowed me to mimic the intended production environment more closely.

NB. I have chosen to interpret your 'one machine' as meaning a physical machine for the purpose of this answer. If your meaning was 'virtual' then I defer to the other answer posted against this question which details how to accomplish this.

Tags:

Rabbitmq