Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitOffsets ¶
func InitOffsets(ctx context.Context, kafkaClient sarama.Client, kafkaAdminClient sarama.ClusterAdmin, topics []string, consumerGroup string) (int32, error)
We want to make sure that ALL consumer group offsets are set before marking the resource as ready, to avoid "losing" events in case the consumer group session is closed before at least one message is consumed from ALL partitions. Without InitOffsets, an event sent to a partition with an uninitialized offset will not be forwarded when the session is closed (or a rebalancing is in progress).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.