Vladimir Tsvetkov created CAMEL-5309:
----------------------------------------
Summary: Replies with Incorrect CorrelationIDs Received After
Reinstantiating a Route with ActiveMQ Endpoint and Exclusive Reply Queue
Key: CAMEL-5309
URL: https://issues.apache.org/jira/browse/CAMEL-5309
Project: Camel
Issue Type: Bug
Components: camel-activemq, camel-jms
Affects Versions: 2.9.2
Environment: Java 1.6, ActiveMQ 5.6-SNAPSHOT (used in-memory within a
Spring application)
Reporter: Vladimir Tsvetkov
When I first instantiate the following route, it works as expected. The Replies
that come have the right correlation ids, just as Camel has assigned them.
{code}
from("direct:fetchStateStart")
.setExchangePattern(ExchangePattern.InOut)
.to("activemq:queue:tasksQueue?replyTo=completionsQueue" +
"&replyToType=Exclusive" +
"&requestTimeout=" + FETCH_INDEX_TIMEOUT)
.threads(10)
.routeId("route-001");
{code}
When this route completes, it is stopped and removed from the camel context.
When a similar route is instantiated:
{code}
from("direct:processStateStart")
.setExchangePattern(ExchangePattern.InOut)
.to("activemq:queue:tasksQueue?replyTo=completionsQueue" +
"&replyToType=Exclusive" +
"&requestTimeout=" + PROCESS_INDEX_TIMEOUT)
.threads(10)
.routeId("route-002");
{code}
Half of the replies come as expected, while the other half results in the
following warning: *Camel Reply received for unknown correlationID*.
A workaround for this issues is to use a different *ReplyTo*-queue for each new
instantiation of a similar route.
E.g. for the second route, it'll work if:
{code}
from("direct:processStateStart")
.setExchangePattern(ExchangePattern.InOut)
.to("activemq:queue:tasksQueue?replyTo=processedIndecesQueue" +
"&replyToType=Exclusive" +
"&requestTimeout=" + PROCESS_INDEX_TIMEOUT)
.threads(10)
.routeId("route-002");
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira