Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 65803 invoked from network); 7 Feb 2011 22:53:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Feb 2011 22:53:19 -0000 Received: (qmail 37844 invoked by uid 500); 7 Feb 2011 22:53:19 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 37788 invoked by uid 500); 7 Feb 2011 22:53:18 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 37780 invoked by uid 99); 7 Feb 2011 22:53:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 22:53:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 22:53:17 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A5A6F198CC1 for ; Mon, 7 Feb 2011 22:52:57 +0000 (UTC) Date: Mon, 7 Feb 2011 22:52:57 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: <874522531.1072.1297119177675.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <379051961.4256.1296609089020.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (AMQ-3172) Add support for Message Priority to Stomp MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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