草庐IT

NewOffsetManagerFromClient

全部标签

go - 如何在 Golang Kafka 10 中获取 GroupID?

我正在使用Kafka10.0和https://github.com/Shopify/sarama.我正在尝试获取消费者处理的最新消息的偏移量。为此,我找到了方法NewOffsetManagerFromClient(groupstring,clientClient)需要组名。如何获取消费者组名称?offsets:=make(map[int32]int64)config:=sarama.NewConfig()config.Consumer.Offsets.CommitInterval=200*time.Millisecondconfig.Version=sarama.V0_10_0_0//

go - 如何在 Golang Kafka 10 中获取 GroupID?

我正在使用Kafka10.0和https://github.com/Shopify/sarama.我正在尝试获取消费者处理的最新消息的偏移量。为此,我找到了方法NewOffsetManagerFromClient(groupstring,clientClient)需要组名。如何获取消费者组名称?offsets:=make(map[int32]int64)config:=sarama.NewConfig()config.Consumer.Offsets.CommitInterval=200*time.Millisecondconfig.Version=sarama.V0_10_0_0//