[
https://issues.apache.org/jira/browse/CAMEL-14257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16988568#comment-16988568
]
Claus Ibsen commented on CAMEL-14257:
-------------------------------------
Okay it also works for me to configure in the route, such as
camel-example-spring-boot
{code}
@Override
public void configure() throws Exception {
getContext().setAllowUseOriginalMessage(true);
getContext().setStreamCaching(true);
from("timer:hello?period={{timer.period}}").routeId("hello").routeGroup("hello-group")
.transform().method("myBean", "saySomething")
.filter(simple("${body} contains 'foo'"))
.to("log:foo")
.end()
.process(e -> {
System.out.println("Allow original message: " +
e.getContext().isAllowUseOriginalMessage());
})
.to("stream:out");
}
{code}
Then logs
{code}
Allow original message: true
Hello World
Allow original message: true
Hello World
{code}
> allowUseOriginalMessage not configurable
> ----------------------------------------
>
> Key: CAMEL-14257
> URL: https://issues.apache.org/jira/browse/CAMEL-14257
> Project: Camel
> Issue Type: Bug
> Components: camel-core, camel-core-engine
> Affects Versions: 3.0.0
> Reporter: michael elbaz
> Priority: Major
>
> *Context*
> Using spring boot container with camel 3 i'm unable to use original message i
> get this exception
> {code:java}
> Error executing reactive work due to AllowUseOriginalMessage is disabled.
> Cannot access the original message.. This exception is ignored
> {code}
> Even doing this:
> {code:java}
> getContext().setAllowUseOriginalMessage(true);
> {code}
> I observe using debugger that
> org.apache.camel.impl.engine.AbstractCamelContext.*isAllowUseOriginalMessage()*
> is called twice at startup first *allowUseOriginalMessage* is *true* then is
> become *false*
--
This message was sent by Atlassian Jira
(v8.3.4#803005)