Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Handling Failure in RabbitMQ

Handling Failure in RabbitMQ

Lightning talk at the DataLayer event in Austin

Lorna Mitchell

May 17, 2017
Tweet

More Decks by Lorna Mitchell

Other Decks in Technology

Transcript

  1. Queues and RabbitMQ • Queues are a brilliant addition to

    any application • They introduce coupling points • RabbitMQ is an open source, powerful message queue • https://www.rabbitmq.com @lornajane
  2. Implementing Retries RabbitMQ doesn't have built in support but: 1.

    Identify message should be retried 2. Create a new message with same data 3. Add retry count/date 4. Ack the original message 5. Reject after X attempts @lornajane
  3. Can Never Process Message Be Defensive: Fail when you can

    Optionally: use a dead letter exchange @lornajane
  4. Reincarnating Messages From the dead letter exchange we usually: •

    monitor and log what arrives • collect messages, then re-route to original destination when danger has passed @lornajane
  5. Healthy Queues Good metrics avoid nasty surprises As a minimum:

    queue size, worker uptime, processing time @lornajane