1.

What is a role of consumer in Kafka?

Answer»

Consumer is a subscriber who consume the messages which predominantly stores in a partition. Consumer is a separate process and can be separate application altogether which run in INDIVIDUAL machine.

  • Consumer can subscribe one and more than one topic.
  • Consumer ALSO maintain the counter for message as per the offset value. 
  • If consumer acknowledge a specific message offset, that means it consume all the previous message.
  • Consumer work on ASYNCHRONOUS pull REQUEST to the broker to ready with byte or data for consumption.
  • Consumer offset value is notified by zookeeper.

If all the consumer falls into the same consumer group, then by using load balancer the message will be DISTRIBUTED over the consumer instances, if consumer instances falls in different group, than each message will be broadcast to all consumer group. 



Discussion

No Comment Found