Show / Hide Table of Contents

    Class KafkaConsumerEndpointConfiguration

    The Kafka consumer endpoint configuration.

    Inheritance
    object
    EndpointConfiguration
    ConsumerEndpointConfiguration
    KafkaConsumerEndpointConfiguration
    Implements
    IEquatable<EndpointConfiguration>
    IEquatable<ConsumerEndpointConfiguration>
    IEquatable<KafkaConsumerEndpointConfiguration>
    Inherited Members
    ConsumerEndpointConfiguration.Equals(EndpointConfiguration)
    ConsumerEndpointConfiguration.Deserializer
    ConsumerEndpointConfiguration.Batch
    ConsumerEndpointConfiguration.Sequence
    ConsumerEndpointConfiguration.ThrowIfUnhandled
    ConsumerEndpointConfiguration.ErrorPolicy
    ConsumerEndpointConfiguration.Encryption
    EndpointConfiguration.Validate()
    EndpointConfiguration.FriendlyName
    EndpointConfiguration.RawName
    EndpointConfiguration.DisplayName
    EndpointConfiguration.MessageValidationMode
    object.GetType()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: Silverback.Messaging.Configuration.Kafka
    Assembly: Silverback.Integration.Kafka.dll
    Syntax
    public sealed record KafkaConsumerEndpointConfiguration : ConsumerEndpointConfiguration, IEquatable<EndpointConfiguration>, IEquatable<ConsumerEndpointConfiguration>, IEquatable<KafkaConsumerEndpointConfiguration>

    Constructors

    KafkaConsumerEndpointConfiguration()

    The Kafka consumer endpoint configuration.

    Declaration
    public KafkaConsumerEndpointConfiguration()

    Properties

    EqualityContract

    The Kafka consumer endpoint configuration.

    Declaration
    protected override Type EqualityContract { get; }
    Property Value
    Type Description
    Type
    Overrides
    ConsumerEndpointConfiguration.EqualityContract

    PartitionOffsetsProvider

    Gets a function that receives all available Confluent.Kafka.TopicPartition for the topic(s) and returns the collection of Confluent.Kafka.TopicPartitionOffset containing the partitions to be consumed and their starting offsets.

    Declaration
    public Func<IReadOnlyCollection<TopicPartition>, ValueTask<IEnumerable<TopicPartitionOffset>>>? PartitionOffsetsProvider { get; init; }
    Property Value
    Type Description
    Func<IReadOnlyCollection<TopicPartition>, ValueTask<IEnumerable<TopicPartitionOffset>>>

    TopicPartitions

    Gets the topics and partitions to be consumed.

    Setting the partition to Confluent.Kafka.Partition.Any for a topic will cause it to be subscribed to get a partition assignment from the message broker, unless a PartitionOffsetsProvider is set. An IKafkaPartitionsAssignedCallback can be registered to interact with the partitions assignment process.

    Setting the partition to Confluent.Kafka.Partition.Any for a topic and setting a PartitionOffsetsProvider will cause the consumer to retrieve the topics metadata, collect all available partitions and call the specified resolver function. The result of the function will be used as static partition assignment for the consumer.

    Setting the offset to Confluent.Kafka.Offset.Unset means that the offset stored on the message broker will be used. If no offset was stored on the server the Configuration.AutoOffsetReset property will determine where to start consuming.

    Declaration
    public IValueReadOnlyCollection<TopicPartitionOffset> TopicPartitions { get; init; }
    Property Value
    Type Description
    IValueReadOnlyCollection<TopicPartitionOffset>

    Methods

    Equals(ConsumerEndpointConfiguration?)

    The Kafka consumer endpoint configuration.

    Declaration
    public override sealed bool Equals(ConsumerEndpointConfiguration? other)
    Parameters
    Type Name Description
    ConsumerEndpointConfiguration other
    Returns
    Type Description
    bool
    Overrides
    ConsumerEndpointConfiguration.Equals(ConsumerEndpointConfiguration?)

    Equals(KafkaConsumerEndpointConfiguration?)

    The Kafka consumer endpoint configuration.

    Declaration
    public bool Equals(KafkaConsumerEndpointConfiguration? other)
    Parameters
    Type Name Description
    KafkaConsumerEndpointConfiguration other
    Returns
    Type Description
    bool

    Equals(object?)

    The Kafka consumer endpoint configuration.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ConsumerEndpointConfiguration.Equals(object?)

    GetHashCode()

    The Kafka consumer endpoint configuration.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ConsumerEndpointConfiguration.GetHashCode()

    PrintMembers(StringBuilder)

    The Kafka consumer endpoint configuration.

    Declaration
    protected override bool PrintMembers(StringBuilder builder)
    Parameters
    Type Name Description
    StringBuilder builder
    Returns
    Type Description
    bool
    Overrides
    ConsumerEndpointConfiguration.PrintMembers(StringBuilder)

    ToString()

    The Kafka consumer endpoint configuration.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ConsumerEndpointConfiguration.ToString()

    ValidateCore()

    Validates the endpoint configuration and throws an BrokerConfigurationException if not valid.

    Declaration
    protected override void ValidateCore()
    Overrides
    ConsumerEndpointConfiguration.ValidateCore()

    Operators

    operator ==(KafkaConsumerEndpointConfiguration?, KafkaConsumerEndpointConfiguration?)

    The Kafka consumer endpoint configuration.

    Declaration
    public static bool operator ==(KafkaConsumerEndpointConfiguration? left, KafkaConsumerEndpointConfiguration? right)
    Parameters
    Type Name Description
    KafkaConsumerEndpointConfiguration left
    KafkaConsumerEndpointConfiguration right
    Returns
    Type Description
    bool

    operator !=(KafkaConsumerEndpointConfiguration?, KafkaConsumerEndpointConfiguration?)

    The Kafka consumer endpoint configuration.

    Declaration
    public static bool operator !=(KafkaConsumerEndpointConfiguration? left, KafkaConsumerEndpointConfiguration? right)
    Parameters
    Type Name Description
    KafkaConsumerEndpointConfiguration left
    KafkaConsumerEndpointConfiguration right
    Returns
    Type Description
    bool

    Implements

    IEquatable<T>
    IEquatable<T>
    IEquatable<T>
    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini