You can use the Vhost RabbitMQ configuration to distinguish between different environments. When creating connections, you need to make sure that in addition to the host name and exchange, which you also point to vhost.
Please note that there are no differences in the tcp port, you are still connecting to 5672, this is just an additional part of the connection metadata, and not the difference in transport level.
Steve martin
source share