Last active
October 1, 2016 23:55
-
-
Save skylerto/f1c91e91be05399a8371194a031a35eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean(name = "KafkaRouteProducer") | |
public RouteBuilder kafkaRouteProducer() { | |
return new RouteBuilder() { | |
public void configure() { | |
from("direct:kafkaRoute") | |
.to("kafka:localhost:9092?topic=test&groupId=testing&autoOffsetReset=earliest&consumersCount=1") | |
.bean(KafkaOutputBean.class); | |
} | |
}; | |
} | |
@Bean(name = "KafkaRouteConsumer") | |
public RouteBuilder kafkaRouteConsumer() { | |
return new RouteBuilder() { | |
public void configure() { | |
from("kafka:localhost:9092?topic=test&groupId=testing&autoOffsetReset=earliest&consumersCount=1") | |
.bean(KafkaOutputBean.class); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment