1 2 Previous Next 18 Replies Latest reply on Oct 9, 2014 3:50 PM by Harley Blumenfeld

    HornetQ Stomp Subscription ID Mangling in JBoss EAP 6.2.4

    Harley Blumenfeld Newbie

      I am working on a project where I am attempting to use Apache.NMS.Stomp to connect to the HornetQ via Stomp.

      I had previously had problems with generating subscribers (Re: Stomp Client 1.5.4 error creating subscription to topic on JBoss HornetQ (Jboss 6.4.2 GA)) but was able to work through that and am looking to supply a patch to the Apache.NMS.Stomp project. The next problem I am running into is kind of weird and I don't fully understand where it is happening.

       

      I have a test case where I write a bunch of messages to the Queue and then pull them off the queue. At first the Stomp client was pulling the messages, but not Acking them or handling them because it didn't think it was subscribed because it appears that the Stomp handler on the JBoss side is mangling the subscription ids.

       

      I turned tracing in the Stomp client and here is what I see. First the library sends a SUBSCRIBE stomp frame:

       

      Debug:StompWireFormat - Writing StompFrame[ Command=SUBSCRIBE, Properties={ id=ID:MYMACHINE-50616-635482262727823605-1:1:1:1 receipt=2 destination=jms.queue.test.queue activemq.dispatchAsync=True transformation=jms-xml activemq.priority=0 activemq.maximumPendingMessageLimit=0 activemq.prefetchSize=1000 ack=client}, Content=]

       

      So far good - JBoss acknowledges receipt of the subscribe message and starts sending MESSAGE stomp frames:

       

      Debug:StompWireFormat - Received StompFrame[ Command=MESSAGE, Properties={ receipt=2 destination=jms.queue.test,queue NMSXDeliveryMode=true timestamp=1412643874233 expires=0 redelivered=false subscription=IDcMYMACHINE-50616-635482262727823605-1\c1c1\c1 message-id=95592 priority=5}, Content=System.Byte[]]

       

      If you look more closely at the ID that was sent with the SUBSCRIBE frame and then returned by the MESSAGE frame you see the following:

      Sent : ID:MYMACHINE-50616-635482262727823605-1:1:1:1

      Rec : IDcMYMACHINE-50616-635482262727823605-1\c1c1\c1

       

      It appears that some of the ':' are turned into plain 'c' and others are turned into '\c'.

      Since I am in the Apache.NMS.Stomp source code I put in a hack to replace both 'c' and '\c' with ':' but feel that is sub-optimal.

       

      I cloned the HornetQ git repository and read through the code and don't see a place where it is doing any modification on the headers or subscription.

      Does anyone have any ideas or clues as to why this is happening?

      Additionally I don't see way to turn up the logging to see the traffic, so if someone knows of a way to do that I would be most appreciative.

        1 2 Previous Next