You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/10/07 08:13:00 UTC

[jira] [Comment Edited] (CAMEL-17048) Exchange header null after upgrading to 3.12 from 3.11.2

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

Claus Ibsen edited comment on CAMEL-17048 at 10/7/21, 8:12 AM:
---------------------------------------------------------------

Can you debug / trace to see if that header is set at all. Also can you build an unit test that reproduce this.

And how do you run Camel.


was (Author: davsclaus):
Can you debug / trace to see if that header is set at all. Also can you build an unit test that reproduce this.

> Exchange header null after upgrading to 3.12 from 3.11.2
> --------------------------------------------------------
>
>                 Key: CAMEL-17048
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17048
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 3.12.0
>            Reporter: Andre
>            Priority: Major
>
> After upgrading camel from {{3.11.2}} to {{3.12.0}} I notice that a header I set in a processor is not being available "later on" anymore.
> h5. It looks as follows:
> Route
> {noformat}
> from(source)
>   .process(myprocessor::setHeader)
>   ...
>   .process(anotherprocessor)
>   ..
>   .to(target)
> ;
> {noformat}
> where myprocessor.setHeader does sth like
> {noformat}
> void setHeader(Exchange exchange) {
>   exchange.getIn().setHeader("my-header", 1234);
> }
> {noformat}
> and {{anotherprocessor}} wants to access this header, e.g.
> {noformat}
> @Override
> void process(Exchange exchange) {
>   ...
>   Long value = exchange.getIn().getHeader("my-header", Long.class);
>   if (value == null) { 
>     throw ..
>   }
> }
> {noformat}
> While with 3.11.x this works fine it stopped with 3.12.0.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)