Skip to content

5. Kafka Consumer

MohanprasadKumar ST edited this page May 17, 2021 · 1 revision

Kafka Consumer

  • Consumer actually consume messages from partition , which is inside topic
  • Every consumer should associated with consumer group
  • if no group_id is provided for a consumer, random consumer group id will be given
  • Configuration needed by the consumer
    • topic
    • bootstrap_server (kafka cluster)
    • group_id

Consumer Group in Kafka

  • Logical grouping of 1 or more consumer
  • Consumer instances are separate process
  • Consumer instance of same consumer group can be on different nodes

Important points to note

  • Consumer can consume from more than 1 partition
  • Same partition can't be assigned to multiple consumers in same consumer group