Interface IKafkaPartitionsAssignedCallback
- Namespace
- Silverback.Messaging.Broker.Callbacks
- Assembly
- Silverback.Integration.Kafka.dll
Declares the OnPartitionsAssigned(IReadOnlyCollection<TopicPartition>, IKafkaConsumer) event handler.
public interface IKafkaPartitionsAssignedCallback : IBrokerClientCallback
Methods
OnPartitionsAssigned(IReadOnlyCollection<TopicPartition>, IKafkaConsumer)
Called when a new consumer group partition assignment has been received by the consumer.
IEnumerable<TopicPartitionOffset>? OnPartitionsAssigned(IReadOnlyCollection<TopicPartition> topicPartitions, IKafkaConsumer consumer)
Parameters
topicPartitionsIReadOnlyCollection<TopicPartition>A collection of Confluent.Kafka.TopicPartition representing the assigned partitions.
consumerIKafkaConsumerThe related consumer instance.
Returns
- IEnumerable<TopicPartitionOffset>
Optionally returns the actual partitions to consume from and start offsets are specified by the return value of the this set of partitions is not required to match the assignment provided by the consumer group, but typically will. Partition offsets may be a specific offset, or special value (
Beginning,EndorUnset). IfUnset, consumption will resume from the last committed offset for each partition, or if there is no committed offset, in accordance with theauto.offset.resetconfiguration property.When
nullthe partitions assignment from the broker is taken and all offsets will be consideredUnset.