You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raul Kripalani (JIRA)" <ji...@apache.org> on 2013/03/04 13:43:12 UTC
[jira] [Created] (CAMEL-6123) camel-jms: InOut exchange can time
out even if response was received
Raul Kripalani created CAMEL-6123:
-------------------------------------
Summary: camel-jms: InOut exchange can time out even if response was received
Key: CAMEL-6123
URL: https://issues.apache.org/jira/browse/CAMEL-6123
Project: Camel
Issue Type: Bug
Components: camel-jms
Affects Versions: 2.10.3, 2.9.5
Reporter: Raul Kripalani
Assignee: Raul Kripalani
Priority: Critical
Fix For: 2.9.6, 2.10.4, 2.11.0
When performing an InOut JMS exchange with a certain requestTimeout, if the reply message is received in time, but the following formula stands true:
{{T0 + T1 >= T!}}, where:
T0 = JMS response time
T1 = remaining route processing time following the reply
T! = requestTimeout
Then camel-jms will throw an {{ExchangeTimedOutException}} regardless of the fact that the reply was truly received in time.
I'm surprised this bug has gone unnoticed until now, as it's been present since mid-2010.
*Example unit test:*
{code:java}
@Test
public void testTimeoutNotTriggered() throws Exception {
getMockEndpoint("mock:exception").expectedMessageCount(0);
template.requestBody("activemq:test", "<hello />");
assertMockEndpointsSatisfied();
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
onException(ExchangeTimedOutException.class)
.handled(true)
.to("mock:exception");
from("activemq:test")
.to("activemq:inexistent?requestTimeout=500")
.delay(constant(600));
}
};
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira