Slide 1

Slide 1 text

Handling Failure in RabbitMQ Lorna Mitchell, IBM https://speakerdeck.com/lornajane

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

A Selection Box Of Failures @lornajane

Slide 4

Slide 4 text

Message Not Processed Question: Better late than never? @lornajane

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

Can Never Process Message Be Defensive: Fail when you can Optionally: use a dead letter exchange @lornajane

Slide 7

Slide 7 text

Dead Letter Exchanges @lornajane

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

Healthy Queues Good metrics avoid nasty surprises As a minimum: queue size, worker uptime, processing time @lornajane

Slide 10

Slide 10 text

Choose How To Fail @lornajane

Slide 11

Slide 11 text

Thanks! Blog post: http://lrnja.net/rabbitfail Personal blog: https://lornajane.net Try RabbitMQ: • https://rabbitmq.com/ • https://bluemix.net @lornajane