Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
T is a subscriber implementation based on ZooKeeper. It maintains consumer group membership and topic subscriptions, watches for other members to join, leave and update their subscriptions, and generates notifications of such changes. It also provides an API to for a partition consumer to claim and release a group-topic-partition.
FIXME: It is assumed that all members of the group are registered with the FIXME: `static` pattern. If a member that pattern is either `white_list` or FIXME: `black_list` joins the group the result will be unpredictable.
func (*T) ClaimPartition ¶
func (s *T) ClaimPartition(claimerActDesc *actor.Descriptor, topic string, partition int32, cancelCh <-chan none.T) func()
ClaimPartition claims a topic/partition to be consumed by this member of the consumer group. It blocks until either succeeds or canceled by the caller. It returns a function that should be called to release the claim.
func (*T) DeleteGroupIfEmpty ¶ added in v0.16.0
func (s *T) DeleteGroupIfEmpty()
DeleteGroupIfEmpty deletes the consumer group data structures from ZooKeeper if there are no more members registered.
func (*T) Stop ¶
func (s *T) Stop()
Stop signals the consumer group member to stop and blocks until its goroutines are over.
func (*T) Subscriptions ¶
Subscriptions returns a channel that subscriptions will be sent whenever a member joins or leaves the group or when an existing member updates its subscription.