Tung, When using JMS with an InOut pattern, camel-jms will take care of the sending the reply using JMSReplyTo. If you send your response explicitly to a given queue at the end of your route, lets call it "queueXYZ", camel-jms will actually wait for a reply from queueXYZ so that it can send the final response to your reply queue!
In your case, it never got a response back from jms.queue.test.reply so the timeout expired! ;) As for the 2nd message, I am not sure if it was an exception message or not. Cheers, Mathieu ---------------------------------------- > Date: Tue, 25 Oct 2011 10:48:02 +0200 > Subject: Re: JMS request-reply and transactions > From: [email protected] > To: [email protected] > > On Tue, Oct 25, 2011 at 1:24 AM, Mathieu Lalonde <[email protected]> wrote: > > > Try removing the <to uri="{{jms.queue.test.reply}}" /> from your route. > > Normally, for InOut, you should not send the response back explicitly. > > Camel takes care of that for you. :) > > > > This solved my problem, thanks Mathieu! > > I assume that the fixed echo route, detects the JMSReplyTo header in the > message and automatically forwards the result of the route to that reply > destination. > > This is some kind of test setup, the final echo implementation would not be > using Camel, but written in some external mainframe application. I guess > that program needs to behave accordingly and put the reply in the correct > destination. > > But I don't understand what went wrong in the previous setup, where I send > the reply explicitly the the reply destination. The initial request route > sees an valid response, so I assume the echo route is finished and has > committed the response. > > Why does the request route still logging some request timeout after a > "successful" receive? And secondly, why do I find a reply message in queue > after the timeout? Is it because the echo route posts TWO (!) messages? > > Anyway, my initial problem is solved, and having a better understanding of > Camel JMS would only be a bonus .. :-) > > Thanks! > > Tung
