<div dir="ltr"><div><br></div>Thank you Alvaro. Here is the code<div>QueueingConsumer consumer = new QueueingConsumer(channel);<span class="Apple-tab-span" style="white-space: pre;"> </span></div><div>channel.basicConsume("queue1", consumer); <span class="Apple-tab-span" style="white-space:pre"> </span></div><div>channel.basicConsume("queue3", consumer); <span class="Apple-tab-span" style="white-space:pre"> </span> <span class="Apple-tab-span" style="white-space:pre"> </span></div><div>while(true){ <span class="Apple-tab-span" style="white-space:pre"> </span></div><div> Delivery delivery = consumer.nextDelivery(); <span class="Apple-tab-span" style="white-space:pre"> </span></div><div> String msg = new String(delivery.getBody()); <span class="Apple-tab-span" style="white-space:pre"> </span></div><div> channel.basicAck(delivery.getEnvelope().getDeliveryTag(),<span class="Apple-tab-span" style="white-space:pre"> </span>true);</div><div>}</div><div><br></div><div>I am using the same consumer object to retrieve the msgs from the queues. If I use the basicCancel, I cannot process the msg from other queues as well. Please correct me If am wrong. If I create new consumer for every queue and consume through the same channel. How do I retrieve the deliveries from more than one consumer. Please refer the code.<br><br>On Monday, April 28, 2014 1:35:36 PM UTC+5:30, Alvaro Videla wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi,
<br>
<br>Yes, you can use basicCancel for a specific consumer. See here:
<br><a href="https://www.rabbitmq.com/amqp-0-9-1-quickref.html" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fwww.rabbitmq.com%2Famqp-0-9-1-quickref.html\46sa\75D\46sntz\0751\46usg\75AFQjCNE4swnoGI5mPi8Nqm-TnCvEjMwAAg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fwww.rabbitmq.com%2Famqp-0-9-1-quickref.html\46sa\75D\46sntz\0751\46usg\75AFQjCNE4swnoGI5mPi8Nqm-TnCvEjMwAAg';return true;">https://www.rabbitmq.com/amqp-<wbr>0-9-1-quickref.html</a>
<br>
<br>Regards,
<br>
<br>Alvaro
<br>
<br>On Mon, Apr 28, 2014 at 9:30 AM, Subshiri S <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="tTBf1ri3tX0J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">subs...@gmail.com</a>> wrote:
<br>>
<br>>>
<br>>> QueueingConsumer consumer = new QueueingConsumer(channel);
<br>>> channel.basicConsume("queue1", consumer);
<br>>> channel.basicConsume("queue3", consumer);
<br>>
<br>>
<br>> Is it possible to stop consuming the messages from the queue "queue3" alone
<br>> dynamically?
<br>>
<br>> ______________________________<wbr>_________________
<br>> rabbitmq-discuss mailing list
<br>> <a href="javascript:" target="_blank" gdf-obfuscated-mailto="tTBf1ri3tX0J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">rabbitmq...@lists.<wbr>rabbitmq.com</a>
<br>> <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Flists.rabbitmq.com%2Fcgi-bin%2Fmailman%2Flistinfo%2Frabbitmq-discuss\46sa\75D\46sntz\0751\46usg\75AFQjCNEa7MyKsA1XPSVZIhQM5kBuKmKiKg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Flists.rabbitmq.com%2Fcgi-bin%2Fmailman%2Flistinfo%2Frabbitmq-discuss\46sa\75D\46sntz\0751\46usg\75AFQjCNEa7MyKsA1XPSVZIhQM5kBuKmKiKg';return true;">https://lists.rabbitmq.com/<wbr>cgi-bin/mailman/listinfo/<wbr>rabbitmq-discuss</a>
<br>>
<br></blockquote></div></div>