[rabbitmq-discuss] messages one at a time

Christos Stavrakakis stavr.chris at gmail.com
Mon Apr 2 09:54:22 BST 2012


On 04/02/2012 11:42 AM, Simone Busoli wrote:
> Hi Raoul,
>
> if you set prefetch-count to 1 on the consumer channel then each 
> consumer on the queue will get one message at a time. Exploiting the 
> default broker behavior by which multiple consumers on a queue are 
> delivered messages in a round-robin fashion, the end result should be 
> what you described.
>

In my understanding, what Raoul wants, is to deliver a message to one 
consumer, only if all other consumers do not hold an unacked message. I 
think that with prefetch-count 1 what is
guaranteed is that each consumer will not get a second message, before 
sending an ACK for the previous. However, a different consumer can get a 
message while
some other consumers hold an unacked message. Am I correct ?

Chris

> On Mon, Apr 2, 2012 at 10:37, Raoul Buzziol <raoulus at gmail.com 
> <mailto:raoulus at gmail.com>> wrote:
>
>     Hi,
>
>     I'm looking for a way to consume messages from a queue by multiple
>     consumer one at a time. The queue should deliver a new message
>     only after an ack.
>
>     The way I found to handle it is to let the consumer be exclusive.
>     But In this case only one consumer can be access to the queue.
>     My clients comes and goes, should they try to consume all
>     interested queues and skip those whom rejects access? And then
>     poll accessibility of available queues?
>     Are there better solutions, is this the way or am I wrong?
>
>     Thanx, Raoul
>
>     (.net client on RabbitMQ 2.8.1)
>
>     _______________________________________________
>     rabbitmq-discuss mailing list
>     rabbitmq-discuss at lists.rabbitmq.com
>     <mailto:rabbitmq-discuss at lists.rabbitmq.com>
>     https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120402/ac5138a7/attachment.htm>


More information about the rabbitmq-discuss mailing list