Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-7395

JMSXGroupID header is not attached to message sent to STOMP/ws client.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.15.6, 5.15.9
    • Fix Version/s: None
    • Component/s: STOMP
    • Labels:
      None
    • Environment:

      Description

      I am connecting to ActiveMQ with STOMP over websocket. When I publish message(s) with JMSXGroupID the header is correctly set on message(s) (visible in GUI). The grouping algorithm also works correctly (messages from same group are directed to single consumer - I tested this). However JMSXGroupID header (and any other header containing group)  is not attached to message sent from broker to client. On the other hand any custom user-defined headers (like "custom-header") are correctly both set on message sent by producer and received by consumer.

      Here is dump of raw message (using WireShark) sent form broker to client. It should have JMSXGroupID but it's missing.

      MESSAGE
      content-length:14
      expires:0
      destination:/queue/test
      ack:ID\c449700d2a71d-41667-1580831329460-10\c2
      subscription:sub-0
      priority:4
      custom-header:XXXX2
      message-id:ID\c449700d2a71d-41667-1580831329460-3\c9\c-1\c1\c2
      persistent:true
      timestamp:1580832022431

      test message 2

       

      This causes issue that when consumer/subscription has activemq.prefetchSize > 1 then it's not possible process messages from same groups on consumer side in correct order (assuming here that consumer "manually" ACKs each message ack: client-individual).

       

      Example case:

      MSG1: group = A

      MSG2: group = A

      MSG3: group = B

      MSG4: group = B

       

      When prefetchSize = 4 and consumer receives those 4 messages "at once" (let's say there is only one consumer so it receives all groups) then it's not possible by consumer to guess which of those messages can be processed and ACKed in parallel and which sequentially.

       

      What I tracked so far is that this test https://github.com/apache/activemq/blob/9abe2c6f97c92fc99c5a2ef02846f62002a671cf/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java#L703 does not operate on what ActiveMQ sent over STOMP - instead it uses JMS Consumer to test how message is delivered.

       

        Attachments

          Activity

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              alekbarszczewski Aleksander BARSZCZEWSKI
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: