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/31 07:33:24 UTC

[GitHub] [camel-kafka-connector] amulrajesh opened a new issue, #1520: Transformer not printing the custom headers set in Processor

amulrajesh opened a new issue, #1520:
URL: https://github.com/apache/camel-kafka-connector/issues/1520

   Using kafka-connector and kamelets,
   
   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


[GitHub] [camel-kafka-connector] amulrajesh commented on issue #1520: Transformer not printing the custom headers set in Processor

Posted by "amulrajesh (via GitHub)" <gi...@apache.org>.
amulrajesh commented on issue #1520:
URL: https://github.com/apache/camel-kafka-connector/issues/1520#issuecomment-1491963888

   Thanks oscerd


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

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


[GitHub] [camel-kafka-connector] oscerd closed issue #1520: Transformer not printing the custom headers set in Processor

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd closed issue #1520: Transformer not printing the custom headers set in Processor
URL: https://github.com/apache/camel-kafka-connector/issues/1520


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

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


[GitHub] [camel-kafka-connector] squakez commented on issue #1520: Transformer not printing the custom headers set in Processor

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #1520:
URL: https://github.com/apache/camel-kafka-connector/issues/1520#issuecomment-1491446165

   @amulrajesh I've moved the issue in the camel-kafka-connector project where I think you'll receive better support.


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

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


[GitHub] [camel-kafka-connector] oscerd commented on issue #1520: Transformer not printing the custom headers set in Processor

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1520:
URL: https://github.com/apache/camel-kafka-connector/issues/1520#issuecomment-1491459181

   It needs to be prefixed with CamelHeader.
   
   As reported in the documentation and in the code: https://github.com/apache/camel-kafka-connector/blob/07013f7e84b6516103479fcb20537688d461ea4d/core/src/main/java/org/apache/camel/kafkaconnector/CamelSinkTask.java#L48
   
   essentially it needs to CamelHeader.dummy as header name.


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

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