activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spam trap <>
Subject Re: ActiveMQ-CPP MessageNotReadableException
Date Thu, 22 May 2014 10:03:15 GMT
On Thu, 15 May 2014 09:41:04 -0400, Timothy Bish
<> wrote:

>On 05/07/2014 05:22 AM, spam trap wrote:
>> I need to display the complete message sent from an application in
>> debugging mode.  However I get the MessageNotReadableException thrown
>> when trying to access the body.  Is there a way of making the message
>> readable or otherwise displaying the body?
>Can you provide a bit more detail on what you are doing here, I'm not 
>entirely clear on it.  There are some tricks that you could do if you 
>cast the Message object into the internal ActiveMQMessage types but 
>without seeing some code its hard to help you with an exact solution.

My original post seemed to take ages to show on my newsserver so I
missed your reply until today.

I am trying to print out (in hex) the content of a BytesMessage body
before it is sent to a queue (for debugging purposes).  Trying to get
the body length or data lead to the MessageNotReadableException being

For now I have solved it by using

However I see that there is also cms::Message::reset().

I wonder if either or both are suitable.

View raw message