activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmittal <nmit...@rblt.com>
Subject Re: CMS: Cloning a Message
Date Wed, 03 Jun 2009 20:15:21 GMT

Understood. Thanks Tim.


Timothy Bish wrote:
> 
> On Wed, 2009-06-03 at 12:49 -0700, nmittal wrote:
>> thanks. So could I do something like this...
>> void *cloneMessageProperties(void *src_msg) {
>> 	Message *msg = ((Message *)src_msg)->clone();
>> 	msg->clearBody();
>> 	return msg;
>> }
>> 
> 
>> Timothy Bish wrote:
>> > 
>> > On Wed, 2009-06-03 at 12:24 -0700, nmittal wrote:
>> >> Hi, is there a function to copy all properties in a message to a new
>> one.
>> >> 
>> >> thanks
>> >> Nishant
>> > 
>> > No, you can clone an entire Message with the clone method, but there's
>> > not a specific method for just copying properties.
>> > 
>> > Regards
>> > Tim
>> > 
>> > 
>> > -- 
> 
> 
> Yes, that will work so long as the new message you need is of the same
> type, e.g. you want a new TextMessage with the properties of another
> TextMessage.
> 
> Regards
> Tim.
> 
> -- 
> Tim Bish
> http://fusesource.com
> http://timbish.blogspot.com/
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/CMS%3A-Cloning-a-Message-tp23857727p23858637.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message