activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BenXS <bxsto...@yahoo.co.uk>
Subject Re: How to forward a full message received in Java by onMessage() into another queue?
Date Fri, 20 Aug 2010 08:47:19 GMT

Hmm, this is interesting.

If I set in a new JMS message the destination Queue to "aaa"  with the
method setJMSDestination() but sent the JMS Msg to another queue "bbb" then
the JMS header field JMSdestination will will be brutally overwritten with
"bbb".

I can imagine that this happens with the JMSmessageID in the same way. If
(for another new) JMSmsg
the user sets the JMSmesaggeId to 4711 it will automatically be overwritten
by a new generated Number from ActiveMQ.  Has someone tried this out?

Ben



It will be a new message with a new Id, so you will need to explicitly
set the correlationID to the original messageID

On 13 August 2010 14:28, Martin C. <martinc@gmx.at> wrote:
> Hi,
>
> On Fri, Aug 13, 2010 at 2:30 PM, Gary Tully <gary.tully@gmail.com> wrote:
>>
>> you need a message producer and do producer.send(..., message);
>>
>
> will this also preserve the message ID or will a new message ID be
> used for this message? I am interested as I may need to forward some
> messages to another broker and I'd like to keep the message ID for use
> in the answer's correlation ID.
> Thanks in advance!
> Best regards,
> Martin

-- 
View this message in context: http://old.nabble.com/How-to-forward-a-full-message-received-in-Java-by-onMessage%28%29-into-another-queue--tp29427831p29489943.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message