Can I change rabbitmq node name?
I have started to run RabbitMQ on EC2 linux.
I'm running a RabbitMQ on default settings, so my RabbitMQ node name is rabbit@{hostname} now and the hostname is default EC2 hostname, ip-{my IP address}
.
I want to change the node name, if I change the directories and .pid name in mnesia/
and rabbitmq.conf
file as rabbit@newhost
, would it be work?
Solution 1:
I think yes, you can configure any of this parameters using environment variables, it's described on RabbitMQ configuration page https://www.rabbitmq.com/configure.html
Solution 2:
The following is what should be in the /etc/rabbitmq/rabbitmq-env.conf
file (create it):
NODENAME=rabbitNodeName@myServerName
Next restart RabbitMQ:
sudo service rabbitmq-server restart