camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "S.R." <>
Subject Pipeline and disableReplyTo propositions
Date Fri, 11 Jul 2008 21:44:00 GMT


My suggestions/propositions are based on my expirience with Camel that I
received in last several weeks.

1. Pipeline original.setOut behaviour.

After all the sub-processors are done, Pipeline processor makes the call:
ExchangeHelper.copyResults(original, nextExchange), that copies
nextExchange.out to the original.out, but... if the nextExchange.out is
null, then it takes instead:

 Message out = source.getOut(false);
 if (out != null) {
 } else {
                // no results so lets copy the last input
                // as the final processor on a pipeline might not
                // have created any OUT; such as a mock:endpoint
                // so lets assume the last IN is the OUT

Well, that's reasonable since we will have response in any case. But there
are many situations where it confuses (for example,
In the real life I have a little bit different situation, in other words, in
some cases I need to just ignore the fact that JMSReplyTo field is set, and
to not make any replies. disableReplyTo can't be used in my case because it
applies for all messages coming from source destination.

My suggestion on this is to make this bahaviour configurable through the
CamelContext, so that user could choose what type of pipeline behaviour
should be. So the code can look like:

 Message out = source.getOut(false);
 if (out != null) {
 } else if (result.getContext().isUseInAsOutForPipilene()) {

2. Propagate disableReplyTo property to the JmsProducer

Currently, disableReplyTo property is only applicable for "from" endpoints
meaning that all messages coming to such an endpoint won't have replies. (or
I'm wrong?)

I think, it would be very nice if this property were propagated to the
JmsProducer too, so that it could be used in JmsProducer.process(...) method

 public void process(final Exchange exchange) {
        final org.apache.camel.Message in = exchange.getIn();
        if (exchange.getPattern().isOutCapable() && !this.disableReplyTo) {
                // InOut implementation
        } else {
                // InOnly implementation

So, we would be able to use disableReplyTo parameter for "to" endpoints as
well as for "from" endpoints, for example:


if expr2 is true, then the message won't be responded, otherwise it will be.

I have a very brief familiarity with Camel source code, and I can be wrong
in my assumptions, sorry about that:)

That is it for this time:)

Looking forward for your answers.

Thank you,

View this message in context:
Sent from the Camel - Development mailing list archive at

View raw message