MCPcopy
hub / github.com/segmentio/kafka-go / GroupBalancer

Interface GroupBalancer

groupbalancer.go:24–39  ·  groupbalancer.go::GroupBalancer

GroupBalancer encapsulates the client side rebalancing logic.

Source from the content-addressed store, hash-verified

22
23// GroupBalancer encapsulates the client side rebalancing logic.
24type 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//

Callers 9

findGroupBalancerFunction · 0.65
TestClientJoinGroupFunction · 0.65
makeJoinGroupRequestMethod · 0.65
makeJoinGroupRequestMethod · 0.65
TestRangeAssignGroupsFunction · 0.65
assignTopicPartitionsMethod · 0.65

Implementers 3

RangeGroupBalancergroupbalancer.go
RoundRobinGroupBalancergroupbalancer.go

Calls

no outgoing calls

Tested by

no test coverage detected