camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <>
Subject [jira] [Resolved] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases
Date Mon, 10 Sep 2012 14:22:07 GMT


Willem Jiang resolved CAMEL-5464.

       Resolution: Fixed
    Fix Version/s: 2.11.0

Applied the patch into trunk, as it breaks the behavior of old Camel version, I don't want
to port it back to other branches.
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>                 Key: CAMEL-5464
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>             Fix For: 2.11.0
>         Attachments: CAMEL-5464.patch
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges
(i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if
the route looks like: consumer => processor, and Camel doesn't find the need to "weave
in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message
to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect
them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing,
for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable
and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a

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:

View raw message