camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike L. <patzer...@hotmail.com>
Subject RE: InOut over JMS always leads to Timout (ExchangeTimedOutException)
Date Wed, 30 Mar 2011 21:49:05 GMT

Paul:

Thank you for your response. Please see my comments inline below...

> To: users@camel.apache.org
> Date: Tue, 29 Mar 2011 04:35:51 -0700
> Subject: Re: InOut over JMS always leads to Timout (ExchangeTimedOutException)
> 
> Mike,
> 
> I can't see your original description of the problem in this thread, so
> maybe I'm regurgitating old and obvious advice, but...

I hope you can view the original description of the problem as well as the entire thread here:



http://camel.465427.n5.nabble.com/InOut-over-JMS-always-leads-to-Timout-ExchangeTimedOutException-td4237336.html


> 
> Are both test classes using JMS endpoints inside a Camel route? And do
> they both have the necessary JMS/ActiveMQ configuration in Spring XML?

My original example/test Spring files did not have a route for the publisher.
I added this route:

        <route>
            <from uri="vm:Hello.InOut"/>
            <inOut uri="activemq:Hello.InOut?exchangePattern=InOut"/>
        </route>

to the publisher, but that didn't change anything. Approx. 30% of the messages timeout.

> 
> Have you turned on debug logging? This should show whether your JMS
> producer is actually failing to connect, or failing to receive the
> response.
> 
> If it's failing to connect, do the logs indicate what specific call
> failed? Maybe your broker is unavailable, or maybe it cannot create the
> queue in question, or maybe your JNDI server cannot resolve it; etc...
> you get the idea.

All good thoughts!  I did some more testing and have narrowed down (hopefully) what is going
on.
The publisher sends all messages successfully.
Approximately 30% of the messages timeout (i.e. the response is not received).
When a response is not received (in a timely fashion) then ActiveMQ removes the message from
the original queue and delivers it to the DLQ. Attachment #1 (ActiveMQ_DLQ_Msg.png) 
shows a sample of such a message.

I have also attached the debug log from the consumer; with the hope that it will help.

In summary, I believe the consumer is failing to consume the message. When the timeout occurs
in the publisher, then he stops listening on the temp-queue and ActiveMQ then moves the original
message to the DLQ. (Alternatively, the message is published with a TTL and ActiveMQ moves
the original message to the DLQ after the message/TTL has expired. I'm unsure of the inner
workings of AMQ.)

> 
> If it's timing out while waiting for a response, then check the
> JMSReplyTo header; is your consumer actually delivering the response
> here?
> 
> Regards,
> Paul
> 
> 
> On Mon, 2011-03-28 at 23:39 -0700, Claus Ibsen wrote:
> > Hi
> >
> > See this FAQ
> > http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
> >
> > And change your logic to set the answer on the IN thats just much
> > easier, in the HelloProcessor.
> >
> >

I tried this - it seemed to make the problem much worse.

Thank you both for your responses. Any further thoughts/advice would be greatly appreciated!

TIA,

Mike L. (aka patzerbud)

 		 	   		  
Mime
View raw message