use of com.tvd12.ezymq.kafka.EzyKafkaConsumer in project ezyfox-server-example by tvd12.
the class KafkaConfig method config.
@Override
public void config() {
EzyKafkaProxy kafkaProxy = EzyKafkaProxy.builder().scan("org.youngmonkeys.example.push_message.kafka").ignoreUnknownComponents(true).addSingleton(responseFactory).build();
EzyKafkaConsumer consumer = kafkaProxy.getConsumer("message");
EzyProcessor.processWithException(consumer::start);
}
use of com.tvd12.ezymq.kafka.EzyKafkaConsumer in project ezyfox-examples by tvd12.
the class KafkaConsumer method main.
public static void main(String[] args) throws Exception {
EzyKafkaProxy kafkaProxy = EzyKafkaProxy.builder().scan("com.tvd12.ezymq.example.kafka").build();
EzyKafkaConsumer consumer = kafkaProxy.getConsumer("hello-world");
consumer.start();
while (true) {
Thread.sleep(1000);
}
}
Aggregations