offset

package
v0.40.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfAllOffsetsInitialized added in v0.24.6

func CheckIfAllOffsetsInitialized(kafkaClient sarama.Client, kafkaAdminClient sarama.ClusterAdmin, topics []string, consumerGroup string) (bool, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL