[ 
https://issues.apache.org/jira/browse/CAMEL-14257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16987894#comment-16987894
 ] 

michael elbaz edited comment on CAMEL-14257 at 12/4/19 2:45 PM:
----------------------------------------------------------------

In configure method (i use BaseRoute class that itself extend RouteBuidler) 

{code:java}
public class BaseRoute extends EndpointRouteBuilder {
    @Autowired
    private DeadLetterChannelBuilder deadLetterChannelBuilder;

    private EndpointConsumerBuilder input;
    private EndpointProducerBuilder output;

    @Override
    public void configure() throws Exception {
        *getContext().setAllowUseOriginalMessage(true);*
        // Dead letter channel
        errorHandler(deadLetterChannelBuilder);
    }

    protected EndpointProducerBuilder getOutput() {
        return output;
    }

    protected void setOutput(EndpointProducerBuilder output) {
        this.output = output;
    }

    protected EndpointConsumerBuilder getInput() {
        return input;
    }

    protected void setInput(EndpointConsumerBuilder input) {
        this.input = input;
    }

}

{code}

i'll try now in application.yml


was (Author: michael992):
In configure method (i use BaseRoute class that itself extend RouteBuidler) 

{code:java}
public class BaseRoute extends EndpointRouteBuilder {
    @Autowired
    private DeadLetterChannelBuilder deadLetterChannelBuilder;

    private EndpointConsumerBuilder input;
    private EndpointProducerBuilder output;

    @Override
    public void configure() throws Exception {
        getContext().setAllowUseOriginalMessage(true);
        // Dead letter channel
        errorHandler(deadLetterChannelBuilder);
    }

    protected EndpointProducerBuilder getOutput() {
        return output;
    }

    protected void setOutput(EndpointProducerBuilder output) {
        this.output = output;
    }

    protected EndpointConsumerBuilder getInput() {
        return input;
    }

    protected void setInput(EndpointConsumerBuilder input) {
        this.input = input;
    }

}

{code}

i'll try now in application.yml

> 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)

Reply via email to