activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: ActiveMQ-CPP question
Date Fri, 24 Aug 2012 13:24:38 GMT
On Fri, 2012-08-24 at 14:15 +0100, spam trap wrote: 
> Hi,
> 
> I am using ActiveMQ-CPP to consume messages asynchronously.  In my
> onMessage() method can I refer to the cms::Message object directly?
> 
> All the examples show this being casted to another type (eg.
> BytesMessage).  Some messages may not have payloads so I am not
> sure what exact type to use for these.
> 

You only need to cast when you want to get to the Message body,
otherwise you can safely access the Message properties from the passed
in cms::Message pointer. 

-- 
Tim Bish
Sr Software Engineer | FuseSource Corp
tim.bish@fusesource.com | www.fusesource.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Mime
View raw message