sensu / sensu-transport

The Sensu transport abstraction library.
MIT License
14 stars 19 forks source link

Support multiple RabbitMQ brokers #5

Closed portertech closed 9 years ago

portertech commented 9 years ago

This change is backwards compatible and continues to support string configuration.

The Sensu RabbitMQ transport shuffles the provided broker connection options, attempting to connect to each of them, one at a time, in the event of an initial TCP connection failure or reconnect. If Sensu fails to make an initial connection to all of the brokers (or hangs on one), the 20 second initial connection timeout will trigger a reconnect.

Reconnect now does a full connection close and setup, addressing state issues, should fix https://github.com/sensu/sensu/issues/771

{
    "rabbitmq": [
        {
            "host": "8.8.8.8"
        },
        {
            "host": "4.4.4.4"
        },
        "amqp://guest:guest@2.2.2.2:5671/sensu"
    ]
}