[rabbitmq-discuss] Message ack timeout

Haldun Bayhantopcu hbayhantopcu at gmail.com
Fri Oct 10 12:29:36 BST 2008


Hi all,

I'm trying to set up a system where one process produces several
messages to many consumer processes. Each consumer creates a new
record in database for each message. Since this is a bit slow,
and heavy work for database when especially a lot of messages
are produced in a short interval, I considered buffering the
messages in consumer processes, and then sending them to the
database in batch. I also don't want to lose messages -in case of
a failure in consumer process- so I don't ack immediately
when a message arrived, but after successfullyinserting to database.

Here is where the problem occurs. When I buffer the messages in
consumer process, broker seems to send that same messages to
another consumer process. So basically I need to find out a
way to prevent the broker from sending the messages that I just
buffered in my process, for a certain time.

I looked around to find a way to set up timeout or something,
however found none. Maybe there is another mechanism to achieve
the behavior that I described here.

Thanks in advance,
Haldun.





More information about the rabbitmq-discuss mailing list