Ben
Ben

Reputation: 4666

How does a Kafka consumer choose from which topic to poll next?

Suppose, I have a consumer subscribed to multiple topics. Which topic is chosen, when I do a poll? I'm using RdKafka .Net for the client. Is there a way I can influence, which topic is chosen?

Upvotes: 1

Views: 298

Answers (1)

Matthias J. Sax
Matthias J. Sax

Reputation: 62330

The consumer does poll for all topic partitions (that are not paused). The broker decides what data to return. You cannot influence the broker's behavior directly.

Not sure if RdKafka has an API to pause and resume partitions. I only now Java KafkaConsumer, that offers methods #pause() and #resume().

Upvotes: 3

Related Questions