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:[email protected]] Sent: Thursday, February 28, 2013 7:51 PM To: [email protected] 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" <[email protected]> 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 <[email protected]> wrote: > > > >> re is no trace of priority queues. How can I create one, or i >
