Changed the way to build rabbitmq hosts string to make it more flexible