-
1. Re: Convert ClientMessage to TextMessage
ataylor Jul 10, 2013 7:50 AM (in response to 123avi)just use the core API instead of JMS, there are some examples in the docs and also in the distribution. or look at the javadocs
-
2. Re: Convert ClientMessage to TextMessage
123avi Jul 10, 2013 10:19 AM (in response to ataylor)Thanks. I Tried that , but could not read the message
-
3. Re: Convert ClientMessage to TextMessage
ataylor Jul 10, 2013 10:25 AM (in response to 123avi)the jms api is just a facade on the core api, so it will work, without example code i cant really help you
-
4. Re: Convert ClientMessage to TextMessage
123avi Jul 11, 2013 3:41 AM (in response to ataylor)Thanks Andy , I really apreciate your help .
I tried to show part of the code at my original message .
but basically if the producer wirtes the message
javax.jms.TextMessage
txtMessage = session.createTextMessage("helloWorld")and the consumer is getting the message as Client message
org.hornetq.api.core.client.ClientMessage
clientMessage .how can he get the message body
this does not work : clientMessage.getBodyBuffer.readString
-
5. Re: Convert ClientMessage to TextMessage
ataylor Jul 11, 2013 4:18 AM (in response to 123avi)Each message type will write its body buffer in a different way, I think with textMessage its a write/readNullableSimpleString, you can look at the source to see how each message does it but this is internal API stuff and may change. Alternatively just use the core API like i said (for the send as well)