Consumers

  • aka Subscribers
  • They read data from a topic (identified by name)
  • They know which broker to read from
  • Data is read in order from each partition
  • Consumers actually poll data to get the latest data

Consumer Group

  • Consumers read data in consumer groups
  • Each consumer within a group reads from exclusive partitions
  • If you have more consumers than partitions, some consumers will be inactive
  • If one consumer reads then offset increases and others cannot read it

Consumer Offsets

  • Kafka stores the offset at which a consumer group has been reading
  • The offsets are committed live in Kafka topic named __consumer_offsets
  • If consumer dies it can start back from where it left off

Consumer Configs

Delivery Semantics for Consumers

  • Consumers choose when to commit offsets
  • 3 delivery semantics:
    • At least once
    • At most once
    • Exactly once

consumers

  • Consumer Group consumer_group
  • Inactive Consumer consumer_group_inactive_consumer
  • Delivery semantics consumers_delivery_semantics