camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: TimeoutException when using ReplyTo?
Date Wed, 23 Jan 2008 15:31:38 GMT
On 23/01/2008, DominicTulley <dominic.tulley@telelogic.com> wrote:
>
> I have a routebuilder set up which sets a couple of headers on a message and
> then passes that message on from queue A to queue B thus:
>
> from ("activemq.a").setHeader("myflag",myexpression).to("activemq.b")
>
> When I send messages with no ReplyTo set, it all works just fine.  The
> messages arrive in B with their flag set appropriately.
> Then I realised I had forgotten to set ReplyTo, so in my sending code I
> added:
> - the creation of a temp queue
> - setting the replyto destination to that temp queue
> - the creation of a consumer on the temp queue
> - the receive call to get the answer.

BTW you don't have to do that; if you send a message to the JMS
endpoint with InOut as the message exchange pattern
(Exchange.setPattern()) it will automatically do this for you.


> Now, when I send the message various things are different/broken.  After the
> message has been through the "route" and arrived at queue B we have the
> following:
>
> 1)  The message has acquired an expiry time which it didn't previously have
> 2)  The message has been flagged as persistent (but the send mode is
> non-persistent)
> 3)  The message has acquired a correlationID

Thats all part of us trying to implement InOut behaviour for you under
the covers. You can override this by disabling InOut mode for messages
with a ReplyTo address set if you like.

Stepping back a little - could you describe exactly what you want to
happen; you want to consume from queue A then make a request-reply on
queue B and send the reply back to A?
-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Mime
View raw message