Reputation: 563
How to get ActiveMQByteMessage body in text format ?
Boolean result = ((JmsMessage)message).getBody() instanceof ActiveMQBytesMessage;
This result
show it's true
For ActiveMQTestMessage I have to following : (ActiveMQTextMessage) ((JmsMessage)message).getBody().getText()
which gives me required body content.
Upvotes: 0
Views: 3262
Reputation: 55690
From the ActiveMQBytesMessage you can get the message content as bytes. And then you can convert that into a String.
That is just standard java with byte[] -> String
Upvotes: 2