GroupBalancer encapsulates the client side rebalancing logic.
| 22 | |
| 23 | // GroupBalancer encapsulates the client side rebalancing logic. |
| 24 | type GroupBalancer interface { |
| 25 | // ProtocolName of the GroupBalancer |
| 26 | ProtocolName() string |
| 27 | |
| 28 | // UserData provides the GroupBalancer an opportunity to embed custom |
| 29 | // UserData into the metadata. |
| 30 | // |
| 31 | // Will be used by JoinGroup to begin the consumer group handshake. |
| 32 | // |
| 33 | // See https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-JoinGroupRequest |
| 34 | UserData() ([]byte, error) |
| 35 | |
| 36 | // DefineMemberships returns which members will be consuming |
| 37 | // which topic partitions |
| 38 | AssignGroups(members []GroupMember, partitions []Partition) GroupMemberAssignments |
| 39 | } |
| 40 | |
| 41 | // RangeGroupBalancer groups consumers by partition |
| 42 | // |
no outgoing calls
no test coverage detected