activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] Commented: (AMQ-3172) Add support for Message Priority to Stomp
Date Mon, 07 Feb 2011 22:52:57 GMT


Timothy Bish commented on AMQ-3172:

The test given isn't quite right in that it produces to the Queue and then immediately creates
a consumer and consumes a message.  What can happen here is that the first message sent is
dispatched and processed before the second message even makes it onto the Queue and so it
appears to be out of order but in fact its not.  You can see this by inserting a small sleep
just after sending the second message, in this case both messages will be placed on the brokers
queue and dispatched in the correct order.  You could also place a small sleep after the consumer
create so that both messages arrive in the consumers prefetch buffer and then see that they
are dequeued in the correct order.  

> Add support for Message Priority to Stomp
> -----------------------------------------
>                 Key: AMQ-3172
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Transport
>    Affects Versions: 5.4.2
>            Reporter: Craig Lewis
>            Priority: Minor
>         Attachments:
> Creating a Stomp message with a priority header has no effect.  The messages are delivered
in FIFO order, not priority order.
> The Stomp transport (activemq-core/src/main/java/org/apache/activemq/transport/stomp/
is calling msg.setJMSPriority(), but never calls producer.setPriority().  Because of this,
messages claims to have a priority, but the messages are never actually re-ordered.
> I believe a new unit test should be added to activemq-core/src/test/java/org/apache/activemq/transport/stomp/
 It should send 2 messages at different priorities, and verifies that they are re-ordered
by ActiveMQ.  I'll attach a unit test.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message