You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by rsteppac2 <ra...@steppacher.name> on 2017/01/30 14:58:40 UTC

allowUseOriginalMessage="false" with useOriginalMessage="true" - new camel.breadcrumbId value

Hello all,

I stumbled across a misconfiguration in one of my routes where the context
did not allow the use of the original message:

<camelContext allowUseOriginalMessage="false">

But by accident one of the routes had an onCompletion handler set to use the
original message:

<onCompletion useOriginalMessage="true">

I don't think the onCompletion handler acutally got the original message.
Unless the exchange property map is not a new instance and changes to the
map during route processing are also reflected in the "original" message.
But what happened was that a new camel.breadcrumbId was generated for the
exchange in the onCompletion handler.

Would that be a bug or a feature? If it is a feature, then why? 
I would have expected a warning or even an exception due to the
configuration inconsistency.

I am using Camel 2.16.3. I saw that
https://issues.apache.org/jira/browse/CAMEL-9250 changes the default setting
of the Camel context for 2.18x. Has the behavior changed with 2.18? (I
cannot test 2.18 due to AMQ incompatibilities.)


Thanks!
Ralf



--
View this message in context: http://camel.465427.n5.nabble.com/allowUseOriginalMessage-false-with-useOriginalMessage-true-new-camel-breadcrumbId-value-tp5793194.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: allowUseOriginalMessage="false" with useOriginalMessage="true" - new camel.breadcrumbId value

Posted by rsteppac2 <ra...@steppacher.name>.
Claus Ibsen-2 wrote
> From Camel 2.18 onwards you will get an exception if you attempt to
> access the original message and it was not allowed.

Thanks Claus for clarifying.

Ralf




--
View this message in context: http://camel.465427.n5.nabble.com/allowUseOriginalMessage-false-with-useOriginalMessage-true-new-camel-breadcrumbId-value-tp5793194p5793202.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: allowUseOriginalMessage="false" with useOriginalMessage="true" - new camel.breadcrumbId value

Posted by Claus Ibsen <cl...@gmail.com>.
For your version of Camel you must yourself turn that allow on or off
depending on your use it or not.

From Camel 2.18 onwards you will get an exception if you attempt to
access the original message and it was not allowed.

On Mon, Jan 30, 2017 at 3:58 PM, rsteppac2 <ra...@steppacher.name> wrote:
> Hello all,
>
> I stumbled across a misconfiguration in one of my routes where the context
> did not allow the use of the original message:
>
> <camelContext allowUseOriginalMessage="false">
>
> But by accident one of the routes had an onCompletion handler set to use the
> original message:
>
> <onCompletion useOriginalMessage="true">
>
> I don't think the onCompletion handler acutally got the original message.
> Unless the exchange property map is not a new instance and changes to the
> map during route processing are also reflected in the "original" message.
> But what happened was that a new camel.breadcrumbId was generated for the
> exchange in the onCompletion handler.
>
> Would that be a bug or a feature? If it is a feature, then why?
> I would have expected a warning or even an exception due to the
> configuration inconsistency.
>
> I am using Camel 2.16.3. I saw that
> https://issues.apache.org/jira/browse/CAMEL-9250 changes the default setting
> of the Camel context for 2.18x. Has the behavior changed with 2.18? (I
> cannot test 2.18 due to AMQ incompatibilities.)
>
>
> Thanks!
> Ralf
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/allowUseOriginalMessage-false-with-useOriginalMessage-true-new-camel-breadcrumbId-value-tp5793194.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2