Show / Hide Table of Contents

    Interface IKafkaConsumer

    Consumes from one or more endpoints and pushes the received messages via the message bus.

    Inherited Members
    IConsumer.TriggerReconnectAsync()
    IConsumer.StartAsync()
    IConsumer.StopAsync(bool)
    IConsumer.CommitAsync(IBrokerMessageIdentifier)
    IConsumer.CommitAsync(IReadOnlyCollection<IBrokerMessageIdentifier>)
    IConsumer.RollbackAsync(IBrokerMessageIdentifier)
    IConsumer.RollbackAsync(IReadOnlyCollection<IBrokerMessageIdentifier>)
    IConsumer.IncrementFailedAttempts(IRawInboundEnvelope)
    IConsumer.Name
    IConsumer.DisplayName
    IConsumer.StatusInfo
    Namespace: Silverback.Messaging.Broker
    Assembly: Silverback.Integration.Kafka.dll
    Syntax
    public interface IKafkaConsumer : IConsumer

    Properties

    Client

    Gets the related IBrokerClient.

    Declaration
    IConfluentConsumerWrapper Client { get; }
    Property Value
    Type Description
    IConfluentConsumerWrapper

    Configuration

    Gets the consumer configuration.

    Declaration
    KafkaConsumerConfiguration Configuration { get; }
    Property Value
    Type Description
    KafkaConsumerConfiguration

    EndpointsConfiguration

    Gets the endpoints configuration.

    Declaration
    IReadOnlyCollection<KafkaConsumerEndpointConfiguration> EndpointsConfiguration { get; }
    Property Value
    Type Description
    IReadOnlyCollection<KafkaConsumerEndpointConfiguration>

    Methods

    GetOffsetsForTimestamps(IEnumerable<TopicPartitionTimestamp>, TimeSpan)

    Looks up the offsets for the given partitions by timestamp. The returned offset for each partition is the earliest offset for which the timestamp is greater than or equal to the given timestamp. If the provided timestamp exceeds that of the last message in the partition, a value of Confluent.Kafka.Offset.End will be returned.

    Declaration
    IReadOnlyList<TopicPartitionOffset> GetOffsetsForTimestamps(IEnumerable<TopicPartitionTimestamp> topicPartitionTimestamps, TimeSpan timeout)
    Parameters
    Type Name Description
    IEnumerable<TopicPartitionTimestamp> topicPartitionTimestamps

    The mapping from partition to the timestamp to look up.

    TimeSpan timeout

    The maximum period of time the call may block.

    Returns
    Type Description
    IReadOnlyList<TopicPartitionOffset>

    A mapping from partition to the timestamp and offset of the first message with timestamp greater than or equal to the target timestamp.

    Remarks

    The consumer does not need to be assigned to the requested partitions.

    Pause(IEnumerable<TopicPartition>)

    Pauses the consumption of the specified partitions.

    Declaration
    void Pause(IEnumerable<TopicPartition> partitions)
    Parameters
    Type Name Description
    IEnumerable<TopicPartition> partitions

    The list of Confluent.Kafka.TopicPartition to be paused.

    Resume(IEnumerable<TopicPartition>)

    Resumes the consumption of the specified partitions.

    Declaration
    void Resume(IEnumerable<TopicPartition> partitions)
    Parameters
    Type Name Description
    IEnumerable<TopicPartition> partitions

    The list of Confluent.Kafka.TopicPartition to be paused.

    Seek(TopicPartitionOffset)

    Seeks the specified partition to the specified offset.

    Declaration
    void Seek(TopicPartitionOffset topicPartitionOffset)
    Parameters
    Type Name Description
    TopicPartitionOffset topicPartitionOffset

    The offset.

    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini