unable to decode binary message in c# subscriber

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

unable to decode binary message in c# subscriber

Rudra.Awasthi
Hi, I am facing issue in using StompConnect. Following is scenario details: I am using java application for publishing messages to Glassfish server "topic" and using c# application as a subscriber receiving message from that "Topic". * Java publisher does not use stompconnect for publishing the message. For this purpose i choose to use StompConnect to facilitate this scenario. I followed the instructions on following link: "https://wikis.oracle.com/display/GlassFish/OpenMQStompConnect" to successfully set up stompconnect. This all works fine when i am dealing with sending of text messages. But i need to publish ".wav" and other types of files, which subscriber should be able to receive. Problem definition: I am able to receive the message and read it using "BinaryReader" class in c#, but the saved file are not usable. I think the encoding is messed up. The length of message iam receiving is much more (nearly 4 times) the length of original message. I tried changing the encoding to various different available encodings but no result. When saved the files doesn't open properly. format is corrupted while saving. StompConnectReceiverc#.txt javapublisher.txt I also tried using header: "content-type:application/octet-stream" , it also didn't work. P.S.: This scenario is working if i use homogeneous technology, i.e. if sender and receiver are both in c# and using stompconnect to send and receive message, it works fine. I am attaching the code snippet along with this mail. Any help is appreciated.