Skip to content
Jonathan Halterman edited this page Jan 16, 2014 · 10 revisions

Lyra was designed to handle and recover from any RabbitMQ failure that could reasonably occur. In addition to recovering from initial failures, Lyra will handle recovery failures as appropriate. These failure scenarios along with the recovery sequences are described below.

Connection closure

Connections can be unexpectedly closed due to various reasons including network failure, server errors, or administrative actions.

  • Connection unexpectedly closed
    • The connection, exchanges, queues, bindings, channels and consumers are recovered.
  • Connection unexpectedly closed, recovery fails
    • Recovery is re-attempted according to the recovery policy.

Connection invocation failure

  • Connection invocation fails
    • Invocation is retried (if permissible) according to the retry policy else the failure is re-thrown.
  • Connection invocation fails, connection closed
    • The connection, channels, exchanges, queues, bindings and consumers are recovered and the invocation is retried (if permissible).
  • Connection invocation fails, connection closed, recovery fails
    • Recovery is re-attempted according to the recovery policy. Once recovery succeeds the invocation is retried (if permissible) according to the retry policy.

Channel closure

Channels can be unexpectedly closed for various reasons including invalid application initiated operations, connection closure, and server errors.

  • Channel unexpectedly closed
    • The channel, its consumers, and their related exchanges, queues and bindings are recovered.
  • Channel unexpectedly closed, connection closed
    • The connection, channel, exchanges, queues, bindings and consumers are recovered.
  • Channel unexpectedly closed, recovery fails
    • Recovery is re-attempted according to the recovery policy.

Channel invocation failure

Channel invocation failures often result in the channel being closed which requires that the channel be recovered in addition to the invocation being retried (when permissible).

  • Channel invocation fails
    • Invocation is retried (if permissible) according to the retry policy else the failure is re-thrown.
  • Channel invocation fails, channel closed
    • The channel, its consumers, and their related exchanges, queues and bindings are recovered. and the invocation is retried (if permissible).
  • Channel invocation fails, connection closed
    • The connection, channel, exchanges, queues, bindings and consumers are recovered and the invocation is retried (if permissible).
  • Channel invocation fails, channel closed, recovery fails
    • Recovery is re-attempted according to the recovery policy. Once recovery succeeds the invocation is retried (if permissible) according to the retry policy.

Consumer closure

Consumers can be unexpectedly closed as the result of a channel error or closure, a connection closure, or an inadvertent queue deletion.

  • Consumer unexpectedly closed
    • The consumer, along with any required queues and bindings, is recovered.
  • Consumer unexpectedly closed, channel/connection closed
    • The channel/connection, queues, bindings and consumer are recovered.
  • Consumer unexpectedly closed, recovery fails
    • Recovery is not re-attempted since the consumer may be missing a required queue.