[rabbitmq-discuss] data being fetched from other queues too(that are not named in basicConsume)
amr.mostafa at gmail.com
Mon Apr 11 15:02:18 BST 2011
It looks like you are mistaking Channel.basicConsume for Channel.basicGet.
The first (which you are using) is asynchronous and what it does is
subscribe a consumer with the messaging server on a given queue. All
incoming messages to do that queue will be directly sent by the messaging
server to that subscribed consumer. In the QueuingConsumer implementation,
those received messages are held in an internal queue and you fetch them
This model is called subscription-based, another simpler approach is using
Channel.basicGet. I advise you to check this for details:
On Mon, Apr 11, 2011 at 3:19 PM, Kamal <kamal.nandan at gmail.com> wrote:
> I am facing a strange problem while using RabbitMq.
> I have a consumer that creates 3 queues(just for name sake HIGH/MEDIUM/
> LOW priority queues) on the RabbitMQ server and consumes data from the
> 3 queues in this order:
> 5 messages from HIGH
> 3 messages from MEDIUM
> 2 messages from LOW.
> This keeps on happening in round-robin fashion.
> If there is no data available on the respective queue, the data from
> the next queue is fetched.
> I am using "Channel.basicConsume(queueName, ACK, QueueingConsumer)"
> and "QueueingConsumer.nextDelivery(timeout)" to fetch the data.
> What I see here is: I see that the data is fetched from the other
> queues too. i.e. Even though I have passed the queuename as "HIGH",
> then too i see that the data is being fetched from the queue "LOW" or
> "MEDIUM" and vice versa. I am finding this behaviour quite strange.
> Can someone plz help me out with this.
> Following is a snippet of my code.:
> Thanks in advance..
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
Egypt Development Center
Member of NTG
Office: +(202)24052355/6 - Ext.: 2005
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss