|
@@ -7,6 +7,8 @@ import (
|
|
|
|
|
|
|
|
// Offset Manager
|
|
// Offset Manager
|
|
|
|
|
|
|
|
|
|
+const groupGenerationUndefined = -1
|
|
|
|
|
+
|
|
|
// OffsetManager uses Kafka to store and fetch consumed partition offsets.
|
|
// OffsetManager uses Kafka to store and fetch consumed partition offsets.
|
|
|
type OffsetManager interface {
|
|
type OffsetManager interface {
|
|
|
// ManagePartition creates a PartitionOffsetManager on the given topic/partition.
|
|
// ManagePartition creates a PartitionOffsetManager on the given topic/partition.
|
|
@@ -476,8 +478,9 @@ func (bom *brokerOffsetManager) flushToBroker() {
|
|
|
|
|
|
|
|
func (bom *brokerOffsetManager) constructRequest() *OffsetCommitRequest {
|
|
func (bom *brokerOffsetManager) constructRequest() *OffsetCommitRequest {
|
|
|
r := &OffsetCommitRequest{
|
|
r := &OffsetCommitRequest{
|
|
|
- Version: 1,
|
|
|
|
|
- ConsumerGroup: bom.parent.group,
|
|
|
|
|
|
|
+ Version: 1,
|
|
|
|
|
+ ConsumerGroup: bom.parent.group,
|
|
|
|
|
+ ConsumerGroupGeneration: groupGenerationUndefined,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for s := range bom.subscriptions {
|
|
for s := range bom.subscriptions {
|