1 year ago
#76089

paul
Kafka Priority queue using topics
I'm trying to create a priority queue using Kafka Consumer
, I read about Bucket
pattern,and how to use it in one Topic
, distributing partitions between the Buckets.
But what I need is to do here, is using different topics high, medium, low
ensure I will only consume from High
as long as there are message in the topic to be consumed
Kafka Consumer provide a way to pass a list of topics to the consumers but it seems he is doing round-robin
balancing between topics
Here a code example that I did to prove it
What I would like to know is, if exist any mechanism in Kafka Consumer to tell him, when he is subscribing to several topics, that he have to focus on one, and no read anything from another topic, if this first one is still getting events.
Regards.
java
apache-kafka
kafka-consumer-api
0 Answers
Your Answer