[rabbitmq-discuss] Limiting the number of non-ack messages cause of subsystem

Matthew Sackman matthew at rabbitmq.com
Sat Oct 22 23:42:29 BST 2011

On Sat, Oct 22, 2011 at 02:08:40PM -0700, jhiemer wrote:
> I am currently facing the following situation:
> My setup has a Topic Exchange, wherein all messages are stored. The
> problem is: the messages consumed are limited by the backend-system.
> The backend-system is only able to process 10 message at the same
> time. Each of this messages is bound to a separate thread and I need
> to wait for its execution until a "slot" is free again. The execution
> time may vary between 10 seconds and 10 minutes. Is it reasonable to
> send ACKs just after this amount of time, for acceptance of new
> messages?

Yes, that will be fine, but you might want to consider some other
approaches. You could cancel the consumer, then ack all of the msgs. At
that point you'll receive no further msgs. Then, when you're ready
again, recreate the consumer and grab the next 10 msgs. This will only
work effectively if you set basic.qos prefetch count to 10 also.

However, thinking about it, there may not really be much advantage
between what I'm suggesting and just delaying the acks. Especially if
you still do the basic.qos prefetch = 10 even in the ack-only version.


More information about the rabbitmq-discuss mailing list