Your client doesn’t need to hold polling to find out if the group changed; it could fetch metadata as soon as if it is instantiated cache that metadata until it gets a mistake indicating your metadata may be out of time. This error can come in two types: (1) a socket error showing the consumer cannot communicate with a specific dealer, (2) an error rule inside reaction to a request showing this specialist no more has the partition for which data was actually required.
- Period through a list of “bootstrap” Kafka URLs until we find one we can connect with. Fetch cluster metadata.
- Techniques bring or build demands, leading them to the right dealer on the basis of the topic/partitions they deliver to or bring from.
- When we have a suitable mistake, refresh the metadata and attempt once again.
- It balances information and ask for weight over brokers
- They functions as ways to divvy right up control among consumer procedures while permitting regional county and keeping purchase in the partition.