Understanding Kafka Topics and Partitions

I am starting to learn Kafka, during my readings, some questions came to my mind:

  1. When a producer is producing a message – it will specify the topic it wants to send the message to, is that right? Does it care about partitions?

  2. When a subscriber is running – does it specify its group id so that it can be part of a cluster of consumers of the same topic or several topics that this group of consumers is interested in?

  3. Does each consumer group have a corresponding partition on the broker or does each consumer have one?

  4. Are the partitions created by the broker, and therefore not a concern for the consumers?

  5. Since this is a queue with an offset for each partition, is it the responsibility of the consumer to specify which messages it wants to read? Does it need to save its state?

  6. What happens when a message is deleted from the queue? – For example, the retention was for 3 hours, then the time passes, how is the offset being handled on both sides?

4 Answers
4

Leave a Comment