Using Kafka through Observable(RxJava)
apache-kafka, rx-java, spring-cloud-stream
Solution
You can use it as follows:
val consumer = new RxConsumer("zookeeper:2181", "consumer-group")
consumer.getRecordStream("cool-topic-(x|y|z)")
.map(deserialize)
.take(42 seconds)
.foreach(println)
consumer.shutdown()
For more information see: https://github.com/cjdev/kafka-rx
Problem
I have a producer (using Kafka), and more than one consumer. So I publish a message in a topic and then my consumers receive and process the message. I need to receive a response in the producer from at least one consumer (better if it be the first). I'm trying to use RxJava to do it (observables). Is it possible to do in that way? Anyone have an example?