You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "amulrajesh (via GitHub)" <gi...@apache.org> on 2023/03/30 17:23:21 UTC

[GitHub] [camel-k] amulrajesh opened a new issue, #4203: Unable to capture header set in Processor from Transformer

amulrajesh opened a new issue, #4203:
URL: https://github.com/apache/camel-k/issues/4203

   I am setting some custom header in Processor,
   
   public class CustomProcessor implements Processor {
     @Override
     public void process(Exchange exchange) throws Exception {
         exchange.getMessage().setHeader("dummy", "dummy");
         exchange.getIn().setHeader("dummy", "dummy");
    }
   }
   
   And I am trying to get the header value (from above step) in Transformer,
   public class CamelToKafkaHeadersTransform<R extends ConnectRecord<R>> implements
       Transformation<R> {
     @Override
     public R apply(R record) {
         for(Header header : record.headers()) {
               System.out.println(header.key(), header.value());
         }
     }
   }
   
   
   Except the custom header I am able to print other camel header values.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org