Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I ensure that a message can always reach a suitable queue even if the RabbitMQ node which I’m sending to crashes?

0
Posted

How can I ensure that a message can always reach a suitable queue even if the RabbitMQ node which I’m sending to crashes?

0

At the risk of sounding pedantic, you could wait for the dead node to recover from disk. In other words, RabbitMQ provides “eventual delivery” out of the box. If you want to persist more reliably than with a single disk then use a RAID or a SAN. The problem with using a single node is the time it takes to recover the node and the cost (if any) of the client reconnection. The time to recover is partly influenced by how much state must be recovered and partly by the size of the unavailability window that your application can tolerate. Many applications don’t like to wait more than (say) 1ms, 10ms or 50ms before they can send their message. In this case, you will typically want to send a message _before_ the crashed node has been able to recover. You can achieve this in two ways: • You don’t care about replicating state and can use any other queue as a ‘suitable queue’. This is easy – just make sure the right consumers and routes are wired up. • You do care about replicating state. Then y

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.