You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow groupID to be specified when assigning partition (#161)
* Allow groupID to be specified when assigning partition
Motivation:
A Consumer Group can provide a lot of benefits even if the
dynamic loadbalancing features are not used.
Modifications:
Allow for an optional GroupID when creating a partition
consumer.
Result:
Consumer Groups can now be used when manual assignment is
used.
* fix format
---------
Co-authored-by: Ómar Kjartan Yasin <[email protected]>
Co-authored-by: blindspotbounty <[email protected]>
Co-authored-by: Franz Busch <[email protected]>
case partition(topic:String, partition:KafkaPartition, offset:KafkaOffset)
60
+
case partition(groupID:String?,topic:String, partition:KafkaPartition, offset:KafkaOffset)
61
61
case group(groupID:String, topics:[String])
62
62
}
63
63
@@ -72,14 +72,16 @@ public struct KafkaConsumerConfiguration {
72
72
///
73
73
/// - Parameters:
74
74
/// - partition: The partition of the topic to consume from.
75
+
/// - groupID: The ID of the consumer group to commit to. Defaults to no group ID. Specifying a group ID is useful if partitions assignment is manually managed but committed offsets should still be tracked in a consumer group.
75
76
/// - topic: The name of the Kafka topic.
76
77
/// - offset: The offset to start consuming from. Defaults to the end of the Kafka partition queue (meaning wait for the next produced message).
0 commit comments