You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/01/10 16:44:44 UTC
[GitHub] [camel-k] waytoharish opened a new issue #1189: Kafka Producer
waytoharish opened a new issue #1189: Kafka Producer
URL: https://github.com/apache/camel-k/issues/1189
Hi,
I am trying to write a Kafka Producer but consumer side my body is NULL.
public class SampleKafkaProvider extends RouteBuilder {
@Override
public void configure() throws Exception {
log.info("About to start route: Kafka Server -> Log ");
restConfiguration()
.component("undertow")
.host("0.0.0.0")
.port("8080");
rest()
.post("/hello")
.to("direct:kafkaproduce");
from("direct:kafkaproduce")
.routeId("DirectToKafka")
.to("kafka:{{consumer.topic}}?brokers={{kafka.host}}:{{kafka.port}}")
.setHeader(Exchange.CONTENT_TYPE, constant("text/plain"))
.transform()
.simple("${body}");
}
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services