[rabbitmq-discuss] Implementing a "processing" queue with message expiry

Derek Chen-Becker dbecker at cpicorp.com
Tue Jan 11 15:21:35 GMT 2011


On 01/10/2011 06:15 PM, Sami Samhuri wrote:
> Hi all,
> 
> I'm designing a small distributed system with some queueing involved and
> have some doubts that Rabbit is the right solution for parts of it.
> Hoping that some of you can shed some light and let me know if Rabbit
> can do it all, which would be great, or if there's a better and/or
> simpler solution I've missed. I realize that Rabbit is for message
> passing and is not a work queue, so perhaps I'm trying to shove a square
> peg into a round hole. If so please tell me that I'm barking up the
> wrong tree.

We use RabbitMQ for a render farm work queue and the way you deal with
possible "lost" consumers is with ACKs. You need to turn off auto-ack
when you set up the consumer, and then after you process the message you
explicitly ACK it (BasicAck). If, for some reason, your client dies
while in the middle of processing messages, any unacked messages it was
holding on to get re-inserted into the queue.

Derek


More information about the rabbitmq-discuss mailing list