JMX API allows me to create a consumer from session using session.createConsumer().<br>I looked at QPID&#39;s implementation for session (AMQSession.java), and here is what I found:<br><br>public MessageConsumer createConsumer(Destination destination) throws JMSException<br>
��� {<br>������� checkValidDestination(destination);<br><br>������� return createConsumerImpl(destination, _prefetchHighMark, _prefetchLowMark, false, (destination instanceof Topic), null, null,<br>��������������������������������� ((destination instanceof AMQDestination)� &amp;&amp; ((AMQDestination)destination).isBrowseOnly()), false);<br>
��� }<br><br><br>protected C createConsumerImpl(final Destination destination, final int prefetchHigh,<br>������������������������������������������������ final int prefetchLow, final boolean noLocal, final boolean exclusive, String selector, final FieldTable rawSelector,<br>
������������������������������������������������ final boolean noConsume, final boolean autoClose) throws JMSException<br>��� {<br>......<br>}<br><br>When I use the properties for queue1, its creating an object of type AMQAnyDestination.java which implements Topic. So, (destination instanceof Topic) =&gt; true. And this will set the consumer as exclusive.<br>
<br>I wonder if the AMQP design is such that fanout is considered an exchange and so we cannot share the queue?<br><br><br><div class="gmail_quote">On Thu, Jul 14, 2011 at 5:28 AM, Simon MacMullen <span dir="ltr">&lt;<a href="mailto:simon@rabbitmq.com">simon@rabbitmq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 14/07/11 13:15, Simon MacMullen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 14/07/11 01:11, Mitra77 wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I get the following message:<br>
&quot;Queue message_queue1 has an exclusive consumer. No more consumers<br>
allowed.&quot;<br>
</blockquote>
<br>
RabbitMQ never returns that exact error message. QPid does though. Are<br>
you sure you&#39;re using RabbitMQ?<br>
</blockquote>
<br></div><div class="im">
On 14/07/11 01:12, Mitra77 wrote:<br>
&gt; I am using QPID, but I figured if this is doable in RabbitMQ, then it should<br>
&gt; be possible in QPID too.<br>
&gt; Am I missing something here?<br>
<br></div>
Oops, missed that bit. Both QPid and RabbitMQ have the concept of an &quot;exclusive&quot; consumer - a consumer which won&#39;t let anything else share the queue it&#39;s consuming from. Somehow you&#39;re inadvertently creating one; it sounds like you don&#39;t want to.<br>

<br>
Unfortunately I&#39;m no expert on the JMS API (understatement); it&#39;s not obvious how you might create a non-exclusive consumer (I would have expected that would be the default, but hey...)<div><div></div><div class="h5">
<br>
<br>
Cheers, Simon<br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, VMware<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
</div></div></blockquote></div><br>