Show / Hide Table of Contents

    Interface IKafkaPartitionsAssignedCallback

    Declares the OnPartitionsAssigned(IReadOnlyCollection<TopicPartition>, KafkaConsumer) event handler.

    Namespace: Silverback.Messaging.Broker.Callbacks
    Assembly: Silverback.Integration.Kafka.dll
    Syntax
    public interface IKafkaPartitionsAssignedCallback : IBrokerCallback

    Methods

    | Improve this doc View source

    OnPartitionsAssigned(IReadOnlyCollection<TopicPartition>, KafkaConsumer)

    Called when a new consumer group partition assignment has been received by the consumer.

    Declaration
    IEnumerable<TopicPartitionOffset>? OnPartitionsAssigned(IReadOnlyCollection<TopicPartition> topicPartitions, KafkaConsumer consumer)
    Parameters
    Type Name Description
    IReadOnlyCollection<TopicPartition> topicPartitions

    A collection of Confluent.Kafka.TopicPartition representing the assigned partitions.

    KafkaConsumer consumer

    The related consumer instance.

    Returns
    Type Description
    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, End or Unset). If Unset, consumption will resume from the last committed offset for each partition, or if there is no committed offset, in accordance with the auto.offset.reset configuration property.

    When null the partitions assignment from the broker is taken and all offsets will be considered Unset.

    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini