activemq-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/AMQ-3172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991679#comment-12991679
] 

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: https://issues.apache.org/jira/browse/AMQ-3172
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Transport
>    Affects Versions: 5.4.2
>            Reporter: Craig Lewis
>            Priority: Minor
>         Attachments: StompTest.java.patch
>
>
> 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/FrameTranslator.java)
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/StompTest.java.
 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: http://www.atlassian.com/software/jira

        

Mime
View raw message