activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hari Iyer (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AMQ-2016) Message grouping not honored when consumers started with existing messages
Date Wed, 26 Nov 2008 20:31:05 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hari Iyer updated AMQ-2016:
---------------------------

    Attachment: MessageGroupTest.java
                MessageGroupDelayedTest.java

> Message grouping not honored when consumers started with existing messages
> --------------------------------------------------------------------------
>
>                 Key: AMQ-2016
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2016
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: JBOSS 4.2.2, AMQ 5.2.0 RA, JDK 1.5, Windows
>            Reporter: Hari Iyer
>         Attachments: MessageGroupDelayedTest.java, MessageGroupTest.java
>
>
> Messages are processed FIFO when messages with different groups are sent to a queue and
then the consumers are started. 
> If the messages are sent after the consumers are started, then message grouping works
as expected.
> Two JUnit tests are attached. 
> 1. MessageGroupTest.java starts up 3 consumers and then sends 30 messages evenly distributed
across 3 groups A, B, and C. 
> Each consumer then gets assigned a group and the ordering is as expected based on the
different sleep intervals defined as seen in the log below
> {quote}
> 2008-11-26 15:06:09,841 INFO  [main] [com.test.MessageGroupTest] 30 messages sent to
group A/B/C
> 2008-11-26 15:06:09,841 INFO  [Thread-4] [com.test.MessageGroupTest] worker3 received
msg C remaining 9
> 2008-11-26 15:06:09,841 INFO  [Thread-3] [com.test.MessageGroupTest] worker2 received
msg A remaining 9
> 2008-11-26 15:06:09,841 INFO  [Thread-2] [com.test.MessageGroupTest] worker1 received
msg B remaining 9
> 2008-11-26 15:06:09,934 INFO  [Thread-4] [com.test.MessageGroupTest] worker3 received
msg C remaining 8
> 2008-11-26 15:06:10,044 INFO  [Thread-4] [com.test.MessageGroupTest] worker3 received
msg C remaining 7
> 2008-11-26 15:06:10,137 INFO  [Thread-4] [com.test.MessageGroupTest] worker3 received
msg C remaining 6
> 2008-11-26 15:06:10,247 INFO  [Thread-4] [com.test.MessageGroupTest] worker3 received
msg C remaining 5
> 2008-11-26 15:06:10,340 INFO  [Thread-4] [com.test.MessageGroupTest] worker3 received
msg C remaining 4
> 2008-11-26 15:06:10,450 INFO  [Thread-4] [com.test.MessageGroupTest] worker3 received
msg C remaining 3
> 2008-11-26 15:06:10,544 INFO  [Thread-4] [com.test.MessageGroupTest] worker3 received
msg C remaining 2
> 2008-11-26 15:06:10,653 INFO  [Thread-4] [com.test.MessageGroupTest] worker3 received
msg C remaining 1
> 2008-11-26 15:06:10,747 INFO  [Thread-4] [com.test.MessageGroupTest] worker3 received
msg C remaining 0
> 2008-11-26 15:06:10,840 INFO  [Thread-2] [com.test.MessageGroupTest] worker1 received
msg B remaining 8
> 2008-11-26 15:06:11,840 INFO  [Thread-2] [com.test.MessageGroupTest] worker1 received
msg B remaining 7
> 2008-11-26 15:06:12,840 INFO  [Thread-2] [com.test.MessageGroupTest] worker1 received
msg B remaining 6
> 2008-11-26 15:06:13,840 INFO  [Thread-2] [com.test.MessageGroupTest] worker1 received
msg B remaining 5
> 2008-11-26 15:06:14,840 INFO  [Thread-3] [com.test.MessageGroupTest] worker2 received
msg A remaining 8
> 2008-11-26 15:06:14,840 INFO  [Thread-2] [com.test.MessageGroupTest] worker1 received
msg B remaining 4
> 2008-11-26 15:06:15,840 INFO  [Thread-2] [com.test.MessageGroupTest] worker1 received
msg B remaining 3
> 2008-11-26 15:06:16,840 INFO  [Thread-2] [com.test.MessageGroupTest] worker1 received
msg B remaining 2
> 2008-11-26 15:06:17,840 INFO  [Thread-2] [com.test.MessageGroupTest] worker1 received
msg B remaining 1
> 2008-11-26 15:06:18,840 INFO  [Thread-2] [com.test.MessageGroupTest] worker1 received
msg B remaining 0
> 2008-11-26 15:06:19,840 INFO  [Thread-3] [com.test.MessageGroupTest] worker2 received
msg A remaining 7
> 2008-11-26 15:06:24,840 INFO  [Thread-3] [com.test.MessageGroupTest] worker2 received
msg A remaining 6
> 2008-11-26 15:06:29,840 INFO  [Thread-3] [com.test.MessageGroupTest] worker2 received
msg A remaining 5
> 2008-11-26 15:06:34,840 INFO  [Thread-3] [com.test.MessageGroupTest] worker2 received
msg A remaining 4
> 2008-11-26 15:06:39,840 INFO  [Thread-3] [com.test.MessageGroupTest] worker2 received
msg A remaining 3
> 2008-11-26 15:06:44,840 INFO  [Thread-3] [com.test.MessageGroupTest] worker2 received
msg A remaining 2
> 2008-11-26 15:06:49,840 INFO  [Thread-3] [com.test.MessageGroupTest] worker2 received
msg A remaining 1
> 2008-11-26 15:06:54,840 INFO  [Thread-3] [com.test.MessageGroupTest] worker2 received
msg A remaining 0
> {quote}
> 2. MessageGroupDelayedTest.java sends 30 messages evenly distributed across 3 groups
A, B, and C and then starts up 3 consumers.
> All 30 messages are delivered in FIFO order to a single consumer as seen in the log below
> {quote}
> 2008-11-26 15:25:50,021 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg A remaining 9
> 2008-11-26 15:25:55,021 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg B remaining 9
> 2008-11-26 15:25:56,021 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg C remaining 9
> 2008-11-26 15:25:56,130 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg A remaining 8
> 2008-11-26 15:26:01,130 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg B remaining 8
> 2008-11-26 15:26:02,130 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg C remaining 8
> 2008-11-26 15:26:02,224 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg A remaining 7
> 2008-11-26 15:26:07,224 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg B remaining 7
> 2008-11-26 15:26:08,224 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg C remaining 7
> 2008-11-26 15:26:08,333 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg A remaining 6
> 2008-11-26 15:26:13,333 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg B remaining 6
> 2008-11-26 15:26:14,333 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg C remaining 6
> 2008-11-26 15:26:14,427 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg A remaining 5
> 2008-11-26 15:26:19,427 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg B remaining 5
> 2008-11-26 15:26:20,427 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg C remaining 5
> 2008-11-26 15:26:20,536 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg A remaining 4
> 2008-11-26 15:26:25,536 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg B remaining 4
> 2008-11-26 15:26:26,536 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg C remaining 4
> 2008-11-26 15:26:26,630 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg A remaining 3
> 2008-11-26 15:26:31,630 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg B remaining 3
> 2008-11-26 15:26:32,630 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg C remaining 3
> 2008-11-26 15:26:32,739 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg A remaining 2
> 2008-11-26 15:26:37,739 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg B remaining 2
> 2008-11-26 15:26:38,739 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg C remaining 2
> 2008-11-26 15:26:38,833 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg A remaining 1
> 2008-11-26 15:26:43,832 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg B remaining 1
> 2008-11-26 15:26:44,832 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg C remaining 1
> 2008-11-26 15:26:44,926 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg A remaining 0
> 2008-11-26 15:26:49,926 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg B remaining 0
> 2008-11-26 15:26:50,926 INFO  [Thread-4] [com.test.MessageGroupDelayedTest] worker3 received
msg C remaining 0
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message