Raymond created CAMEL-21656:
-------------------------------
Summary: Multiple routes with direct/activemq and recipientlist
returns unexpected result
Key: CAMEL-21656
URL: https://issues.apache.org/jira/browse/CAMEL-21656
Project: Camel
Issue Type: Bug
Affects Versions: 4.9.0
Reporter: Raymond
I have a customer that upgraded from an old Camel version (2.23) to 4.9.0 where
the Camel 4 route returned an unexpected result. It's a bit of an edge/curious
case.
It was part of a bigger route, but I tried to create a minimal example to
reproduce the issue.
The following routes:
{code:java}
<routes>
<route id="1">
<from uri="jetty-nossl:http://0.0.0.0:9000/test"/>
<step id="1">
<to uri="activemq:2"/>
</step>
</route>
<route id="2">
<from uri="activemq:2"/>
<step id="2">
<to uri="direct:3"/>
<to uri="activemq:log?exchangePattern=InOnly&timeToLive=86400000"/>
</step>
</route>
<route id="3">
<from uri="direct:3"/>
<step id="3">
<multicast>
<to uri="direct:4a?exchangePattern=InOut"/>
<to uri="direct:4b?exchangePattern=InOut"/>
</multicast>
</step>
</route>
<route id="4a">
<from uri="direct:4a"/>
<step id="4a">
<setBody>
<constant>a</constant>
</setBody>
<to uri="activemq:log?exchangePattern=InOnly&timeToLive=86400000"/>
</step>
</route>
<route id="4b">
<from uri="direct:4b"/>
<step id="4b">
<setBody>
<constant>b</constant>
</setBody>
</step>
</route>
<route id="log">
<from uri="activemq:log"/>
<step id="log">
<to uri="log:mylog"/>
</step>
</route>
</routes> {code}
returns the result: a
expected result: b
The expected result can be shown by changing small things in the route. For
example:
1. Change the endpoint "activemq:2" to "direct:2"
2. Remove this line from route 2:
<to uri="activemq:log?exchangePattern=InOnly&timeToLive=86400000"/>
3. Remove one of the parameters in route 4a of this line:
<to uri="activemq:log?exchangePattern=InOnly&timeToLive=86400000"/>
For example, just by removing the timeToLive option returns the expected result.
----------------------------
With all of these small changes, the expected result 'b' returns. Can you check
why this particular combination produces the unexpected result?
Note: I used ActiveMQ 6.1.5 for testing.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)