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

Kafka Producer #1189

Closed
waytoharish opened this issue Jan 10, 2020 · 2 comments
Closed

Kafka Producer #1189

waytoharish opened this issue Jan 10, 2020 · 2 comments

Comments

@waytoharish
Copy link

waytoharish commented Jan 10, 2020

Hi,
I am trying to write a Kafka Producer.I am able to send the even to Kafka Topic but consumer side my message 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()
        .get("/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"))
    .log("Hello World")
    .transform()
    .simple("Hello World"); 

}

@lburgazzoli
Copy link
Contributor

@waytoharish is this still an issue ?

@lburgazzoli lburgazzoli added the status/waiting-for-feedback Needs some feedback label Jun 5, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2020

This issue is stale because it has been open 30 days with no activity.
Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants