Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transformer not printing the custom headers set in Processor #1429

Closed
amulrajesh opened this issue Mar 30, 2023 · 1 comment
Closed

Transformer not printing the custom headers set in Processor #1429

amulrajesh opened this issue Mar 30, 2023 · 1 comment

Comments

@amulrajesh
Copy link

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 implements
Transformation {
@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.

@oscerd
Copy link
Contributor

oscerd commented Mar 31, 2023

Answered here: apache/camel-kafka-connector#1520

@oscerd oscerd closed this as completed Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants