Reputation: 182
I understand that kafka arranges data of a topic over many partitions, and consumers in one consumer group are assigned different partitions from where they can receive data:
partition-1 partition-2 partition-3 partition-4 partition-5 partition-6
|____________| |____________| |____________|
| | |
consumer-1 consumer-2 consumer-3
My question is:
consumers
, are they identified by host/IP, or by client connection?In other words, if I start two threads or processes, running the same kafka client code with same consumer group, are they considered one consumer or two consumers?
Upvotes: 0
Views: 233
Reputation: 191733
First, Consumers are not thread safe.
More than one instance in separate threads / processes would not be considered as the same client in the group, but they do display host information when you describe the consumer group
Upvotes: 0