...
Role | ZooKeeper Path | Type | Data Description | ||
---|---|---|---|---|---|
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a2df51cdf9e5f3e3-42babf6c-42534aad-8a01a61e-4eeed013cea181b8c05dce19"><ac:plain-text-body><![CDATA[ | ID Registry |
| Ephemeral | String in the format of "creator:host:port" of the broker. | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b82990b70a6a81ab-03741b75-48204986-8909b140-af10ed1c48d1cda1a40e9be6"><ac:plain-text-body><![CDATA[ | Topic Registry |
| Ephemeral | Number of partitions that topic has on that Broker. | ]]></ac:plain-text-body></ac:structured-macro> |
...
- All Consumers in a ConsuerGroup will come to a consensus as to who is consuming what.
- Each Broker+Topic+Partition combination is consumed by one and only one Consumer, even if it means that some Consumers don't get anything at all.
Wiki Markup A Consumer should try to have as many partitions on the same Broker as possible, so sort the list by \[Broker ID\]-\[Partition\] (0-0, 0-1, 0-2, etc.), and assign them in chunks.
- Consumers are sorted by their Consumer IDs. If there are three Consumers, two Brokers, and two partitions in each, the split might look like:
Wiki Markup Consumer A: \[0-0, 0-1\]
Wiki Markup Consumer B: \[0-2, 1-0\]
Wiki Markup Consumer C: \[1-1, 1-2\]
- If the distribution can't be even and some Consumers must have more partitions than others, the extra partitions always go to the earlier consumers on the list. So you could have a distribution like 4-4-4-4 or 5-5-4-4, but never 4-4-4-5 or 4-5-4-4.
Code Example:
...
title | A Consumer finding its Broker Partitions during rebalancing (Python) |
---|---|
borderStyle | solid |
...
- .
...