You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Aleš Trček <Al...@halcom.si> on 2013/02/27 16:46:29 UTC

C++ broker and priority queues

Hi all,

In Java qpid broker priority queues are supported for a while now. In some places it is implied that the feature was added to C++ broker too (https://issues.apache.org/jira/browse/QPID-529, http://apache-qpid-developers.2158895.n2.nabble.com/jira-Created-QPID-4262-C-broker-crashes-due-to-priority-queue-corruption-td7582027.html). However in qpid-config options there is no trace of priority queues. How can I create one, or is it really supported yet? I'm using v0.18. Thanx for any answers.

Regards,
Ales

Re: C++ broker and priority queues

Posted by Jakub Scholz <ja...@scholz.cz>.
I was trying it only with python on my MRG-M 2.2 / Qpid 0.14 broker and it
worked fine. Maybe something changed between 0.14 and 0.18.

I created the queue like this:
    qpid-config -a admin/admin@rgc001:21313 add queue testP
--argument=qpid.priorities=10

and afterwards tested it with following python client:

#! /usr/bin/python

from qpid.messaging import *
from qpid.log import enable, DEBUG
import time
import random

send_address = "testP; { node: { type: queue }, create: never }"
receive_adress = "testP; { create: never, node: { type: queue } }"

connection = Connection(host="rgc001", port=21313, username="admin",
password="admin")

try:
  connection.open()
  session = connection.session()
  sender = session.sender(send_address)
  receiver = session.receiver(receive_adress)

  for i in range(1, 10):
    prio = random.randint(1,10)
    message = Message("Priority " + str(prio), durable=True, priority=prio)

    print ""
    print "SENDING PRIO MESSAGE ", i
    print "####################"
    print "Priority: ", message.priority
    print "Content: ", message.content

    sender.send(message, sync=False, timeout=1000);

  sender.sync(1000)

  print ""
  print "Sending finished ... receiving ..."
  print ""

  time.sleep(10)

  for i in range(1, 10):
    message = receiver.fetch(timeout=None)

    print ""
    print "RECEIVING PRIO MESSAGE ", i
    print "####################"
    print "Priority: ", message.priority
    print "Content: ", message.content

  session.acknowledge()
  sender.sync(1000)

except MessagingError,m:
  print m
finally:
  connection.close()


On Thu, Feb 28, 2013 at 11:16 AM, Aleš Trček <Al...@halcom.si> wrote:

> Thanks for the suggestion, however this does not seem to work. Queue is
> created, messages can be exchanged, but I receive them FIFO not sorted by
> priority. With message.getJMSPriority() I can see the priorities I had set,
> so that is OK. It's just that the queue is not a priority queue. Any other
> insights into this priority stuff on C++ broker? :)
>
> >Hi Aleš,
> >
> >I think you can use the --argument=<NAME=VALUE> option of the qpid-config
> to specify the number of priorities. It is a long time since I used it, but
> I believe it should >be something like ...
> > --argument=qpid.priorities=10
> >... to specify that you want the queue to distinguish 10 priority levels.
> >
> >I'm not sure why the priority queues seem to be missing in the Qpid
> documentation - Red Hat MRG-M documentation seems to contain some more
> details about it (>
> https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MRG/2/html/Messaging_Programming_Reference/sect-Priority_Queuing.html
> ).
> >I'm not sure whether this means that the functionality has been removed
> since 0.14.
> >
> >Regards
> >Jakub
> >
> >On Wed, Feb 27, 2013 at 4:46 PM, Aleš Trček <Al...@halcom.si> wrote:
> >
> >> re is no trace of priority queues. How can I create one, or i
>

Re: C++ broker and priority queues

Posted by Andy Goldstein <an...@redhat.com>.
On Mar 1, 2013, at 9:24 AM, Aleš Trček wrote:

> Ooops, my first posting, and I have already made a fool of myself... :)
> Yes, the priorities work fine, I thought that lower numbers are higher priorities when actually it is the opposite... That and not checking properly the output I got.
> So, for the reference, both:
> $ qpid-config add queue testqueue --argument=qpid.priorities=10
> and:
> $ qpid-config add queue testqueue --argument=x-qpid-priorities=10
> work in qpid C++ 0.18. Now I just wish it would be better documented (or at all :)), it also wouldn't hurt if qpid-stat would have an extra column denoting priority queue (like it is for durable and other types).

If it helps any, "qpid-config queues" will show that information.

> 
> Thanx to all for your help.
> 
> Regards,
> Ales
> 
>> 
>>> -----Original Message-----
>>> From: Pavel Moravec [mailto:pmoravec@redhat.com] 
>>> Sent: Friday, March 01, 2013 1:23 PM
>>> To: users@qpid.apache.org
>>> Subject: Re: C++ broker and priority queues
>>> 
>>> Hi all,
>>> what worked everytime for me (and does so even on 0.18):
>>> 
>>> qpid-config add queue test --argument=x-qpid-priorities=10
>>> 
>>> # let test it using qpid-send, add property "prio" to see the ordering
>>> 
>>> qpid-send -m 1 -a test --priority 2 -P prio=two qpid-send -m 1 -a test --priority 1 -P prio=one qpid-send -m 1 -a test --priority 3 -P prio=three
>>> 
>>> # read the messages by _browsing_ the queue - messages are printed in FIFO order, that is correct (discussed here ~2 years ago)
>>> 
>>> qpid-receive -m 3 -a "test; {mode:browse}" --print-headers=yes | grep prio
>>> Properties: {prio:two, sn:1, ts:1362136552849962388, x-amqp-0-10.routing-key:test}
>>> Properties: {prio:one, sn:1, ts:1362136559340302340, x-amqp-0-10.routing-key:test}
>>> Properties: {prio:three, sn:1, ts:1362136563996705690, x-amqp-0-10.routing-key:test}
>>> 
>>> # consume the messages - will follow priorities now properly
>>> 
>>> qpid-receive -m 3 -a "test" --print-headers=yes | grep prio
>>> Properties: {prio:three, sn:1, ts:1362136563996705690, x-amqp-0-10.routing-key:test}
>>> Properties: {prio:two, sn:1, ts:1362136552849962388, x-amqp-0-10.routing-key:test}
>>> Properties: {prio:one, sn:1, ts:1362136559340302340, x-amqp-0-10.routing-key:test}
>>> 
>>> 
>>> Hope it helps,
>>> 
>>> Zdravím krajany (greetings to compatriots), Pavel Moravec
>>> 
>>> 
>>> ----- Original Message -----
>>>> From: "Aleš Trček" <Al...@halcom.si>
>>>> To: users@qpid.apache.org
>>>> Sent: Friday, March 1, 2013 12:46:47 PM
>>>> Subject: RE: C++ broker and priority queues
>>>> 
>>> The prefetch buffer was set to 1, but this is irrelevant for my test, 
>>> which is as follows:
>>> -create queue with --argument=qpid.priorities=10 -put a few messages 
>>> with prio 6 to the queue (messageProducer.send(message, 
>>> DeliveryMode.PERSISTENT, 6, 0);) -put a few messages with prio 3 -put 
>>> a few messages with prio 4 -check queue stats with qpid-stat - 
>>> messages are in the queue -run receive test, which gets messages one 
>>> by one - first I get messages with prio 6, then 3, then 4, just the 
>>> way I had sent them in (as said, I can see that priorities do get set 
>>> by calling message.getJMSPriority()).
>>> [Actions are run one by one, so there should be no problems with 
>>> session / connection.]
>>> 
>>> Therefore I assume that queue is still FIFO and not a priority queue.
>>> Did someone try this and made it work? :)
>>> 
>>> Regards,
>>> Ales
>>> 
>>> -----Original Message-----
>>> From: Robbie Gemmell [mailto:robbie.gemmell@gmail.com]
>>> Sent: Thursday, February 28, 2013 7:51 PM
>>> To: users@qpid.apache.org
>>> Subject: RE: C++ broker and priority queues
>>> 
>>> Are you sure the queue isn't a priority queue? What is the message 
>>> activity you are using to determine this?
>>> 
>>> Depending on the nature of your test, it is possible you are simply 
>>> seeing the result of the clients message prefetch buffer (defaults to 
>>> 500msg) if you haven't adjusted it. You should use a lower prefetch 
>>> value with a priority queue if the ordering is of most importance to 
>>> you. See 
>>> http://qpid.apache.org/books/trunk/AMQP-Messaging-Broker-Java-Book/htm
>>> l/Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-Set
>>> LowPrefetchfor
>>> more details.
>>> 
>>> Robbie
>>> On 28 Feb 2013 10:17, "Aleš Trček" <Al...@halcom.si> wrote:
>>> 
>>>> Thanks for the suggestion, however this does not seem to work.
>>>> Queue
>>>> is created, messages can be exchanged, but I receive them FIFO not 
>>>> sorted by priority. With message.getJMSPriority() I can see the 
>>>> priorities I had set, so that is OK. It's just that the queue is not 
>>>> a priority queue. Any other insights into this priority stuff on C++ 
>>>> broker? :)
>>>> 
>>>>> Hi Aleš,
>>>>> 
>>>>> I think you can use the --argument=<NAME=VALUE> option of the 
>>>>> qpid-config
>>>> to specify the number of priorities. It is a long time since I used 
>>>> it, but I believe it should >be something like ...
>>>>> --argument=qpid.priorities=10
>>>>> ... to specify that you want the queue to distinguish 10 priority 
>>>>> levels.
>>>>> 
>>>>> I'm not sure why the priority queues seem to be missing in the Qpid
>>>> documentation - Red Hat MRG-M documentation seems to contain some 
>>>> more details about it (> 
>>>> https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MR
>>>> G/ 2/html/Messaging_Programming_Reference/sect-Priority_Queuing.html
>>>> ).
>>>>> I'm not sure whether this means that the functionality has been 
>>>>> removed
>>>> since 0.14.
>>>>> 
>>>>> Regards
>>>>> Jakub
>>>>> 
>>>>> On Wed, Feb 27, 2013 at 4:46 PM, Aleš Trček <Al...@halcom.si>
>>>>> wrote:
>>>>> 
>>>>>> re is no trace of priority queues. How can I create one, or i
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For 
>>> additional commands, e-mail: users-help@qpid.apache.org
>>> 
>>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


RE: C++ broker and priority queues

Posted by Aleš Trček <Al...@halcom.si>.
Ooops, my first posting, and I have already made a fool of myself... :)
Yes, the priorities work fine, I thought that lower numbers are higher priorities when actually it is the opposite... That and not checking properly the output I got.
So, for the reference, both:
$ qpid-config add queue testqueue --argument=qpid.priorities=10
and:
$ qpid-config add queue testqueue --argument=x-qpid-priorities=10
work in qpid C++ 0.18. Now I just wish it would be better documented (or at all :)), it also wouldn't hurt if qpid-stat would have an extra column denoting priority queue (like it is for durable and other types).

Thanx to all for your help.

Regards,
Ales

> 
> > -----Original Message-----
> > From: Pavel Moravec [mailto:pmoravec@redhat.com] 
> > Sent: Friday, March 01, 2013 1:23 PM
> > To: users@qpid.apache.org
> > Subject: Re: C++ broker and priority queues
> > 
> > Hi all,
> > what worked everytime for me (and does so even on 0.18):
> > 
> > qpid-config add queue test --argument=x-qpid-priorities=10
> > 
> > # let test it using qpid-send, add property "prio" to see the ordering
> > 
> > qpid-send -m 1 -a test --priority 2 -P prio=two qpid-send -m 1 -a test --priority 1 -P prio=one qpid-send -m 1 -a test --priority 3 -P prio=three
> > 
> > # read the messages by _browsing_ the queue - messages are printed in FIFO order, that is correct (discussed here ~2 years ago)
> > 
> > qpid-receive -m 3 -a "test; {mode:browse}" --print-headers=yes | grep prio
> > Properties: {prio:two, sn:1, ts:1362136552849962388, x-amqp-0-10.routing-key:test}
> > Properties: {prio:one, sn:1, ts:1362136559340302340, x-amqp-0-10.routing-key:test}
> > Properties: {prio:three, sn:1, ts:1362136563996705690, x-amqp-0-10.routing-key:test}
> > 
> > # consume the messages - will follow priorities now properly
> > 
> > qpid-receive -m 3 -a "test" --print-headers=yes | grep prio
> > Properties: {prio:three, sn:1, ts:1362136563996705690, x-amqp-0-10.routing-key:test}
> > Properties: {prio:two, sn:1, ts:1362136552849962388, x-amqp-0-10.routing-key:test}
> > Properties: {prio:one, sn:1, ts:1362136559340302340, x-amqp-0-10.routing-key:test}
> > 
> > 
> > Hope it helps,
> > 
> > Zdravím krajany (greetings to compatriots), Pavel Moravec
> > 
> > 
> > ----- Original Message -----
> > > From: "Aleš Trček" <Al...@halcom.si>
> > > To: users@qpid.apache.org
> > > Sent: Friday, March 1, 2013 12:46:47 PM
> > > Subject: RE: C++ broker and priority queues
> > > 
> > The prefetch buffer was set to 1, but this is irrelevant for my test, 
> > which is as follows:
> > -create queue with --argument=qpid.priorities=10 -put a few messages 
> > with prio 6 to the queue (messageProducer.send(message, 
> > DeliveryMode.PERSISTENT, 6, 0);) -put a few messages with prio 3 -put 
> > a few messages with prio 4 -check queue stats with qpid-stat - 
> > messages are in the queue -run receive test, which gets messages one 
> > by one - first I get messages with prio 6, then 3, then 4, just the 
> > way I had sent them in (as said, I can see that priorities do get set 
> > by calling message.getJMSPriority()).
> > [Actions are run one by one, so there should be no problems with 
> > session / connection.]
> > 
> > Therefore I assume that queue is still FIFO and not a priority queue.
> > Did someone try this and made it work? :)
> > 
> > Regards,
> > Ales
> > 
> > -----Original Message-----
> > From: Robbie Gemmell [mailto:robbie.gemmell@gmail.com]
> > Sent: Thursday, February 28, 2013 7:51 PM
> > To: users@qpid.apache.org
> > Subject: RE: C++ broker and priority queues
> > 
> > Are you sure the queue isn't a priority queue? What is the message 
> > activity you are using to determine this?
> > 
> > Depending on the nature of your test, it is possible you are simply 
> > seeing the result of the clients message prefetch buffer (defaults to 
> > 500msg) if you haven't adjusted it. You should use a lower prefetch 
> > value with a priority queue if the ordering is of most importance to 
> > you. See 
> > http://qpid.apache.org/books/trunk/AMQP-Messaging-Broker-Java-Book/htm
> > l/Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-Set
> > LowPrefetchfor
> > more details.
> > 
> > Robbie
> > On 28 Feb 2013 10:17, "Aleš Trček" <Al...@halcom.si> wrote:
> > 
> > > Thanks for the suggestion, however this does not seem to work.
> > > Queue
> > > is created, messages can be exchanged, but I receive them FIFO not 
> > > sorted by priority. With message.getJMSPriority() I can see the 
> > > priorities I had set, so that is OK. It's just that the queue is not 
> > > a priority queue. Any other insights into this priority stuff on C++ 
> > > broker? :)
> > >
> > > >Hi Aleš,
> > > >
> > > >I think you can use the --argument=<NAME=VALUE> option of the 
> > > >qpid-config
> > > to specify the number of priorities. It is a long time since I used 
> > > it, but I believe it should >be something like ...
> > > > --argument=qpid.priorities=10
> > > >... to specify that you want the queue to distinguish 10 priority 
> > > >levels.
> > > >
> > > >I'm not sure why the priority queues seem to be missing in the Qpid
> > > documentation - Red Hat MRG-M documentation seems to contain some 
> > > more details about it (> 
> > > https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MR
> > > G/ 2/html/Messaging_Programming_Reference/sect-Priority_Queuing.html
> > > ).
> > > >I'm not sure whether this means that the functionality has been 
> > > >removed
> > > since 0.14.
> > > >
> > > >Regards
> > > >Jakub
> > > >
> > > >On Wed, Feb 27, 2013 at 4:46 PM, Aleš Trček <Al...@halcom.si>
> > > >wrote:
> > > >
> > > >> re is no trace of priority queues. How can I create one, or i
> > >
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For 
> > additional commands, e-mail: users-help@qpid.apache.org
> > 
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: C++ broker and priority queues

Posted by Pavel Moravec <pm...@redhat.com>.
Hi all,
what worked everytime for me (and does so even on 0.18):

qpid-config add queue test --argument=x-qpid-priorities=10

# let test it using qpid-send, add property "prio" to see the ordering

qpid-send -m 1 -a test --priority 2 -P prio=two
qpid-send -m 1 -a test --priority 1 -P prio=one
qpid-send -m 1 -a test --priority 3 -P prio=three

# read the messages by _browsing_ the queue - messages are printed in FIFO order, that is correct (discussed here ~2 years ago)

qpid-receive -m 3 -a "test; {mode:browse}" --print-headers=yes | grep prio
Properties: {prio:two, sn:1, ts:1362136552849962388, x-amqp-0-10.routing-key:test}
Properties: {prio:one, sn:1, ts:1362136559340302340, x-amqp-0-10.routing-key:test}
Properties: {prio:three, sn:1, ts:1362136563996705690, x-amqp-0-10.routing-key:test}

# consume the messages - will follow priorities now properly

qpid-receive -m 3 -a "test" --print-headers=yes | grep prio
Properties: {prio:three, sn:1, ts:1362136563996705690, x-amqp-0-10.routing-key:test}
Properties: {prio:two, sn:1, ts:1362136552849962388, x-amqp-0-10.routing-key:test}
Properties: {prio:one, sn:1, ts:1362136559340302340, x-amqp-0-10.routing-key:test}


Hope it helps,

Zdravím krajany (greetings to compatriots),
Pavel Moravec


----- Original Message -----
> From: "Aleš Trček" <Al...@halcom.si>
> To: users@qpid.apache.org
> Sent: Friday, March 1, 2013 12:46:47 PM
> Subject: RE: C++ broker and priority queues
> 
> The prefetch buffer was set to 1, but this is irrelevant for my test,
> which is as follows:
> -create queue with --argument=qpid.priorities=10
> -put a few messages with prio 6 to the queue
> (messageProducer.send(message, DeliveryMode.PERSISTENT, 6, 0);)
> -put a few messages with prio 3
> -put a few messages with prio 4
> -check queue stats with qpid-stat - messages are in the queue
> -run receive test, which gets messages one by one - first I get
> messages with prio 6, then 3, then 4, just the way I had sent them
> in (as said, I can see that priorities do get set by calling
> message.getJMSPriority()).
> [Actions are run one by one, so there should be no problems with
> session / connection.]
> 
> Therefore I assume that queue is still FIFO and not a priority queue.
> Did someone try this and made it work? :)
> 
> Regards,
> Ales
> 
> -----Original Message-----
> From: Robbie Gemmell [mailto:robbie.gemmell@gmail.com]
> Sent: Thursday, February 28, 2013 7:51 PM
> To: users@qpid.apache.org
> Subject: RE: C++ broker and priority queues
> 
> Are you sure the queue isn't a priority queue? What is the message
> activity you are using to determine this?
> 
> Depending on the nature of your test, it is possible you are simply
> seeing the result of the clients message prefetch buffer (defaults
> to 500msg) if you haven't adjusted it. You should use a lower
> prefetch value with a priority queue if the ordering is of most
> importance to you. See
> http://qpid.apache.org/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-SetLowPrefetchfor
> more details.
> 
> Robbie
> On 28 Feb 2013 10:17, "Aleš Trček" <Al...@halcom.si> wrote:
> 
> > Thanks for the suggestion, however this does not seem to work.
> > Queue
> > is created, messages can be exchanged, but I receive them FIFO not
> > sorted by priority. With message.getJMSPriority() I can see the
> > priorities I had set, so that is OK. It's just that the queue is
> > not a
> > priority queue. Any other insights into this priority stuff on C++
> > broker? :)
> >
> > >Hi Aleš,
> > >
> > >I think you can use the --argument=<NAME=VALUE> option of the
> > >qpid-config
> > to specify the number of priorities. It is a long time since I used
> > it, but I believe it should >be something like ...
> > > --argument=qpid.priorities=10
> > >... to specify that you want the queue to distinguish 10 priority
> > >levels.
> > >
> > >I'm not sure why the priority queues seem to be missing in the
> > >Qpid
> > documentation - Red Hat MRG-M documentation seems to contain some
> > more
> > details about it (>
> > https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MRG/
> > 2/html/Messaging_Programming_Reference/sect-Priority_Queuing.html
> > ).
> > >I'm not sure whether this means that the functionality has been
> > >removed
> > since 0.14.
> > >
> > >Regards
> > >Jakub
> > >
> > >On Wed, Feb 27, 2013 at 4:46 PM, Aleš Trček <Al...@halcom.si>
> > >wrote:
> > >
> > >> re is no trace of priority queues. How can I create one, or i
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


RE: C++ broker and priority queues

Posted by Aleš Trček <Al...@halcom.si>.
The prefetch buffer was set to 1, but this is irrelevant for my test, which is as follows:
-create queue with --argument=qpid.priorities=10
-put a few messages with prio 6 to the queue (messageProducer.send(message, DeliveryMode.PERSISTENT, 6, 0);)
-put a few messages with prio 3
-put a few messages with prio 4
-check queue stats with qpid-stat - messages are in the queue
-run receive test, which gets messages one by one - first I get messages with prio 6, then 3, then 4, just the way I had sent them in (as said, I can see that priorities do get set by calling message.getJMSPriority()).
[Actions are run one by one, so there should be no problems with session / connection.]

Therefore I assume that queue is still FIFO and not a priority queue. Did someone try this and made it work? :)

Regards,
Ales

-----Original Message-----
From: Robbie Gemmell [mailto:robbie.gemmell@gmail.com] 
Sent: Thursday, February 28, 2013 7:51 PM
To: users@qpid.apache.org
Subject: RE: C++ broker and priority queues

Are you sure the queue isn't a priority queue? What is the message activity you are using to determine this?

Depending on the nature of your test, it is possible you are simply seeing the result of the clients message prefetch buffer (defaults to 500msg) if you haven't adjusted it. You should use a lower prefetch value with a priority queue if the ordering is of most importance to you. See http://qpid.apache.org/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-SetLowPrefetchfor
more details.

Robbie
On 28 Feb 2013 10:17, "Aleš Trček" <Al...@halcom.si> wrote:

> Thanks for the suggestion, however this does not seem to work. Queue 
> is created, messages can be exchanged, but I receive them FIFO not 
> sorted by priority. With message.getJMSPriority() I can see the 
> priorities I had set, so that is OK. It's just that the queue is not a 
> priority queue. Any other insights into this priority stuff on C++ 
> broker? :)
>
> >Hi Aleš,
> >
> >I think you can use the --argument=<NAME=VALUE> option of the 
> >qpid-config
> to specify the number of priorities. It is a long time since I used 
> it, but I believe it should >be something like ...
> > --argument=qpid.priorities=10
> >... to specify that you want the queue to distinguish 10 priority levels.
> >
> >I'm not sure why the priority queues seem to be missing in the Qpid
> documentation - Red Hat MRG-M documentation seems to contain some more 
> details about it (> 
> https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MRG/
> 2/html/Messaging_Programming_Reference/sect-Priority_Queuing.html
> ).
> >I'm not sure whether this means that the functionality has been 
> >removed
> since 0.14.
> >
> >Regards
> >Jakub
> >
> >On Wed, Feb 27, 2013 at 4:46 PM, Aleš Trček <Al...@halcom.si> wrote:
> >
> >> re is no trace of priority queues. How can I create one, or i
>

RE: C++ broker and priority queues

Posted by Robbie Gemmell <ro...@gmail.com>.
Are you sure the queue isn't a priority queue? What is the message activity
you are using to determine this?

Depending on the nature of your test, it is possible you are simply seeing
the result of the clients message prefetch buffer (defaults to 500msg) if
you haven't adjusted it. You should use a lower prefetch value with a
priority queue if the ordering is of most importance to you. See
http://qpid.apache.org/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-SetLowPrefetchfor
more details.

Robbie
On 28 Feb 2013 10:17, "Aleš Trček" <Al...@halcom.si> wrote:

> Thanks for the suggestion, however this does not seem to work. Queue is
> created, messages can be exchanged, but I receive them FIFO not sorted by
> priority. With message.getJMSPriority() I can see the priorities I had set,
> so that is OK. It's just that the queue is not a priority queue. Any other
> insights into this priority stuff on C++ broker? :)
>
> >Hi Aleš,
> >
> >I think you can use the --argument=<NAME=VALUE> option of the qpid-config
> to specify the number of priorities. It is a long time since I used it, but
> I believe it should >be something like ...
> > --argument=qpid.priorities=10
> >... to specify that you want the queue to distinguish 10 priority levels.
> >
> >I'm not sure why the priority queues seem to be missing in the Qpid
> documentation - Red Hat MRG-M documentation seems to contain some more
> details about it (>
> https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MRG/2/html/Messaging_Programming_Reference/sect-Priority_Queuing.html
> ).
> >I'm not sure whether this means that the functionality has been removed
> since 0.14.
> >
> >Regards
> >Jakub
> >
> >On Wed, Feb 27, 2013 at 4:46 PM, Aleš Trček <Al...@halcom.si> wrote:
> >
> >> re is no trace of priority queues. How can I create one, or i
>

RE: C++ broker and priority queues

Posted by Aleš Trček <Al...@halcom.si>.
Thanks for the suggestion, however this does not seem to work. Queue is created, messages can be exchanged, but I receive them FIFO not sorted by priority. With message.getJMSPriority() I can see the priorities I had set, so that is OK. It's just that the queue is not a priority queue. Any other insights into this priority stuff on C++ broker? :)

>Hi Aleš,
>
>I think you can use the --argument=<NAME=VALUE> option of the qpid-config to specify the number of priorities. It is a long time since I used it, but I believe it should >be something like ...
> --argument=qpid.priorities=10
>... to specify that you want the queue to distinguish 10 priority levels.
>
>I'm not sure why the priority queues seem to be missing in the Qpid documentation - Red Hat MRG-M documentation seems to contain some more details about it (>https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MRG/2/html/Messaging_Programming_Reference/sect-Priority_Queuing.html).
>I'm not sure whether this means that the functionality has been removed since 0.14.
>
>Regards
>Jakub
>
>On Wed, Feb 27, 2013 at 4:46 PM, Aleš Trček <Al...@halcom.si> wrote:
>
>> re is no trace of priority queues. How can I create one, or i

Re: C++ broker and priority queues

Posted by Jakub Scholz <ja...@scholz.cz>.
Hi Aleš,

I think you can use the --argument=<NAME=VALUE> option of the qpid-config
to specify the number of priorities. It is a long time since I used it, but
I believe it should be something like ...
 --argument=qpid.priorities=10
... to specify that you want the queue to distinguish 10 priority levels.

I'm not sure why the priority queues seem to be missing in the Qpid
documentation - Red Hat MRG-M documentation seems to contain some more
details about it (
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MRG/2/html/Messaging_Programming_Reference/sect-Priority_Queuing.html).
I'm not sure whether this means that the functionality has been removed
since 0.14.

Regards
Jakub

On Wed, Feb 27, 2013 at 4:46 PM, Aleš Trček <Al...@halcom.si> wrote:

> re is no trace of priority queues. How can I create one, or i