Show / Hide Table of Contents

    Class ConsumerEndpoint

    Represents a message broker endpoint to consume from (such as a Kafka topic or RabbitMQ queue or exchange).

    Inheritance
    object
    Endpoint
    ConsumerEndpoint
    KafkaConsumerEndpoint
    MqttConsumerEndpoint
    RabbitConsumerEndpoint
    Implements
    IConsumerEndpoint
    IEndpoint
    Inherited Members
    Endpoint.DefaultSerializer
    Endpoint.DisplayName
    Endpoint.Name
    Endpoint.FriendlyName
    Endpoint.Serializer
    Endpoint.Encryption
    Endpoint.MessageValidationMode
    Endpoint.BaseEquals(Endpoint)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging
    Assembly: Silverback.Integration.dll
    Syntax
    public abstract class ConsumerEndpoint : Endpoint, IConsumerEndpoint, IEndpoint

    Constructors

    | Improve this doc View source

    ConsumerEndpoint(string)

    Initializes a new instance of the ConsumerEndpoint class.

    Declaration
    protected ConsumerEndpoint(string name)
    Parameters
    Type Name Description
    string name

    The endpoint name.

    Properties

    | Improve this doc View source

    Batch

    Gets or sets the batch settings. Can be used to enable and setup batch processing.

    Declaration
    public BatchSettings? Batch { get; set; }
    Property Value
    Type Description
    BatchSettings
    | Improve this doc View source

    ErrorPolicy

    Gets or sets the error policy to be applied when an exception occurs during the processing of the consumed messages.

    Declaration
    public IErrorPolicy ErrorPolicy { get; set; }
    Property Value
    Type Description
    IErrorPolicy
    | Improve this doc View source

    ExactlyOnceStrategy

    Gets or sets the strategy to be used to guarantee that each message is consumed only once.

    Declaration
    public IExactlyOnceStrategy? ExactlyOnceStrategy { get; set; }
    Property Value
    Type Description
    IExactlyOnceStrategy
    | Improve this doc View source

    NullMessageHandlingStrategy

    Gets or sets a value indicating how to handle the null messages. The default value is Tombstone.

    Declaration
    public NullMessageHandlingStrategy NullMessageHandlingStrategy { get; set; }
    Property Value
    Type Description
    NullMessageHandlingStrategy
    | Improve this doc View source

    Sequence

    Gets or sets the sequence settings. A sequence is a set of related messages, like the chunks belonging to the same message or the messages in a dataset.

    Declaration
    public SequenceSettings Sequence { get; set; }
    Property Value
    Type Description
    SequenceSettings
    | Improve this doc View source

    ThrowIfUnhandled

    Gets or sets a value indicating whether an exception must be thrown if no subscriber is handling the received message. The default is true.

    Declaration
    public bool ThrowIfUnhandled { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Improve this doc View source

    GetUniqueConsumerGroupName()

    Gets a unique name for the consumer group (e.g. Kafka's consumer group id). This value (joint with the endpoint name) will be used for example to ensure the exactly-once delivery.

    Declaration
    public abstract string GetUniqueConsumerGroupName()
    Returns
    Type Description
    string

    Returns the unique name for the consumer group.

    Remarks

    It's not enough to use the endpoint name, since the same topic could be consumed by multiple consumer groups within the same process and/or using the same database to store the information needed to ensure the exactly-once delivery.

    | Improve this doc View source

    Validate()

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

    Declaration
    public override void Validate()
    Overrides
    Endpoint.Validate()

    Implements

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