[jboss-jira] [JBoss JIRA] (WFLY-6349) JMSXGroupId has no effect on JMSProducer

Jeff Mesnil (JIRA) issues at jboss.org
Tue Mar 29 09:35:00 EDT 2016


     [ https://issues.jboss.org/browse/WFLY-6349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Mesnil resolved WFLY-6349.
-------------------------------
    Fix Version/s: 10.1.0.Final
       Resolution: Cannot Reproduce Bug


I have not been able to reproduce your issue with the latest WildFly master branch.

I modified the helloworld-mdb quickstart to set the JMSXGroupId (and Seq) on the producer and messages are received in the correct sequence by the same MDB:

{noformat}
15:27:51,765 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-97 (ActiveMQ-client-global-threads-2457283)) Received Message from queue: This is message 1
        JMSXGroupID=sequential
        JMSXDeliveryCount=1
        foo=bar
        JMSXGroupSeq=0

15:27:51,770 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-106 (ActiveMQ-client-global-threads-2457283)) Received Message from queue: This is message 2
        JMSXGroupID=sequential
        JMSXDeliveryCount=1
        foo=bar
        JMSXGroupSeq=1

15:27:51,771 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-110 (ActiveMQ-client-global-threads-2457283)) Received Message from queue: This is message 3
        JMSXGroupID=sequential
        JMSXDeliveryCount=1
        foo=bar
        JMSXGroupSeq=2

15:27:51,784 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-122 (ActiveMQ-client-global-threads-2457283)) Received Message from queue: This is message 4
        JMSXGroupID=sequential
        JMSXDeliveryCount=1
        foo=bar
        JMSXGroupSeq=3

15:27:51,785 INFO  [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-129 (ActiveMQ-client-global-threads-2457283)) Received Message from queue: This is message 5
        JMSXGroupID=sequential
        JMSXDeliveryCount=1
        foo=bar
        JMSXGroupSeq=4
{noformat}

For reference, I've pushed the modified quickstart on GitHub: https://github.com/jmesnil/quickstart/tree/WFLY-6349_JMSXGroupId (relevant code snippets are https://github.com/jmesnil/quickstart/blob/WFLY-6349_JMSXGroupId/helloworld-mdb/src/main/java/org/jboss/as/quickstarts/servlet/HelloWorldMDBServletClient.java#L94-L100 and  https://github.com/jmesnil/quickstart/blob/WFLY-6349_JMSXGroupId/helloworld-mdb/src/main/java/org/jboss/as/quickstarts/mdb/HelloWorldQueueMDB.java#L55-L59)



> JMSXGroupId has no effect on JMSProducer
> ----------------------------------------
>
>                 Key: WFLY-6349
>                 URL: https://issues.jboss.org/browse/WFLY-6349
>             Project: WildFly
>          Issue Type: Bug
>          Components: JMS
>    Affects Versions: 10.0.0.Final
>            Reporter: Harald Wellmann
>            Assignee: Jeff Mesnil
>             Fix For: 10.1.0.Final
>
>
> h3. Scenario
> I'm setting the {{JMSXGroupID}} on a {{JMSProducer}} to achieve message delivery in the correct order. The consumer is a message-driven bean.
> {code}
>         JMSProducer producer = context.createProducer();
>         producer = producer.setProperty("JMSXGroupID", "sequential");
>         producer = producer.setProperty("foo", "bar");
>         for (int i = 0; i < 50; i++) {
>             msgNumber++;
>             String text = "This is message " + msgNumber;
>             producer.send(queue, text);
>         }
> {code}
> h3. Expected Behaviour
> The messages are received in the correct order, the properties {{JMSXGroupID}} and {{foo}} are set on the receiver side.
> h3. Actual Behaviour
> The messages are received in random order. Property {{foo}} is set, but property {{JMSXGroupID}} is null on the receiver side.
> h3. Workaround
> Create a {{TextMessage}} and set the properties on the message, not on the producer.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list