Closed warmfusion closed 7 years ago
@warmfusion this is already a feature :+1: Specify an array for RabbitMQ connection options, "rabbitmq": [{}, {}]
.
Hey, that's cheating. Citing undocumented behavior isn't fair. I'm not even sure I know how that functionality works either; I spent a decent amount of time looking at the sensu-transport code trying to work out how it integrates with the AMQP gem, which itself isn't documented very clearly. Boo.
@warmfusion you're right, I've reopened this issue and it will remain open until https://trello.com/c/jaQZropi/33-document-ha-rabbitmq-configuration has been shipped to the doc site.
@warmfusion we should also document the RabbitMQ transport code with Yardoc as I did for the new Redis transport. The RabbitMQ transport randomly sorts the connection options and iterates through them, attempting to create a connection.
Closing this as configuring Sensu for use with a cluster of RabbitMQ nodes is documented at https://sensuapp.org/docs/latest/reference/rabbitmq.html#configure-sensu-to-use-the-rabbitmq-cluster
I'd like to be able to give Sensu a list of RMQ servers for it to attempt to connect to, with failover supported such that if a connection drops, or cannot be established, sensu tries the next server on the list until it suceeds. An increasing retry delay is introduced to protect against hammering servers.
The AMQP gem used to establish the RMQ connection has support for an
reconnect_to
operation which is used in the event of a connection failure. This could be used to proactivly select which server to rebind the failing connection against.