0

I'm pretty new to rabbit but looking at how consumption works. In the basic example you consume a message, and that by it's very nature removes the message from the queue.

What happens if I blow up. Or my server is shut down once that message is consumed, but before I've done anything with it?

In the Kafka world I maintain an offset, the message remains on the queue, and I can re-consume it in another instance.

Obviously case by case consideration is needed - if I've blown up, then chances are next time I consume that message i'll blow up too. But I can manage that myself - what I really want to know is whether there is a way to take a message, no one else gets it, then 'ack' the message to remove it later on?

Codek
  • 5,114
  • 3
  • 24
  • 38
  • Give a look on these q/a - http://stackoverflow.com/q/21363302, http://stackoverflow.com/q/23158310, http://stackoverflow.com/q/17654475, http://stackoverflow.com/q/24107913. While some of them language-specific, but they may give you an answer about `take a message, no one else gets it, then 'ack' the message to remove it later on`. For more detail I would really suggest you to read through the RabbitMQ docs, while the detailed answer to what happend if this or that will lead to citing almost the whole docs (inc. HA section and clustering). – pinepain Nov 26 '15 at 11:59
  • Brilliant both of those are helpful thanks. – Codek Nov 26 '15 at 12:58
  • So; The reason I hadn't found that solution was that these things are driven from the producer end. i.e. I'd witnessed simple consumption off the queue, message removed that was it, hadn't found the ack call. Had I produced with the relevant TTL options I assume I'd have seen the message remain on the queue and would have known to hunt more for the ack call. All makes sense now. I like the DLX approach that'll work well for us. Additionally i was thinking about the offset concept in the Kafka world - and was trying to find similar here. – Codek Dec 01 '15 at 08:20

0 Answers0