I am trying to connect to hornetq and get use apache.nms to retrieve all the messages.With help of Yong Hao Gao from jboss team am able to get the text messages working but stil unable to get mapmessages.It seems apache.nms is designed for ActiveMQ only and we need to tweak to get it working for HornetQ messages.So far,had to edit Apache.NMS.Stomp.Commands.ConsumerId.cs class to replace : with _ before sending the messages and reverting same after receiving messages.The reason behind this is as follows as per Stomp specs:
When creating a subscriber it sends a stomp frame SUBSCRIBE and it has a 'id' header which looks like this:
You can see the header has special char ":". In Stomp 1.1 spec, it says:
"Escaping is needed to allow header keys and values to contain those frame header delimiting octets as values.When decoding frame headers, the following transformations MUST be applied:
\n (octet 92 and 110) translates to newline (octet 10)
\c (octet 92 and 99) translates to : (octet 58)
(octet 92 and 92) translates to \ (octet 92)"
At the moment,with these changes am able to get it working for text messages but map messages still not working.On having a closer look I find that in Apache.NMS.Stomp.Protocol.StompWireFormat.cs class,in
protected virtual Object CreateCommand(StompFrame frame)
method,the object in frame object is empty in case of mapmessage while same works fine for text messages
Note:This question itself solves starting issue for many c# developers who are trying to connect hornetq but am stuck at the next steps.Thanks Yong for his help to get me upto this point.