You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Elber <sh...@hotmail.fr> on 2007/08/06 15:29:32 UTC

Priority vs Exclusive

Hi,

I've done some tests of consumer priority and exclusive and I found that if
I start 2 consumers on the same queue (the first with a priority = 2 and the
second =1), the first will consume all messages.
It's the same thing whit consumer.exclusive.
So what's the difference between the 2.

I've read the doc and it explained that priority is used to avoid network
Hops, it can't be used to allow to one consumer to consume 80% of messages
and 20% for the other?
 
Syntax: 
queue=new ActiveMQQueue("TEST.QUEUE?consumer.priority=2");
queue=new ActiveMQQueue("TEST.QUEUE?consumer.exclusive=true");

Thank you.
-- 
View this message in context: http://www.nabble.com/Priority-vs-Exclusive-tf4224131s2354.html#a12016222
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Priority vs Exclusive

Posted by James Strachan <ja...@gmail.com>.
On 8/6/07, Elber <sh...@hotmail.fr> wrote:
>
> Hi,
>
> I've done some tests of consumer priority and exclusive and I found that if
> I start 2 consumers on the same queue (the first with a priority = 2 and the
> second =1), the first will consume all messages.
> It's the same thing whit consumer.exclusive.
> So what's the difference between the 2.

You can have multiple consumers with the same priority sharing
messages. With exclusive consumer, you can only ever have a single
consumer, period - irrespective of priorities.


> I've read the doc and it explained that priority is used to avoid network
> Hops, it can't be used to allow to one consumer to consume 80% of messages
> and 20% for the other?

No - to split message consumption across multiple consumers, the
current flow control & prefetch logic deals with letting faster
consumers consume more of the messages

-- 
James
-------
http://macstrac.blogspot.com/