Show / Hide Table of Contents

    Class MqttConsumerEndpoint

    Represents a topic to consume from.

    Inheritance
    object
    Endpoint
    ConsumerEndpoint
    MqttConsumerEndpoint
    Implements
    IConsumerEndpoint
    IEndpoint
    IEquatable<MqttConsumerEndpoint>
    Inherited Members
    ConsumerEndpoint.ErrorPolicy
    ConsumerEndpoint.ExactlyOnceStrategy
    ConsumerEndpoint.Batch
    ConsumerEndpoint.Sequence
    ConsumerEndpoint.NullMessageHandlingStrategy
    ConsumerEndpoint.ThrowIfUnhandled
    Endpoint.DefaultSerializer
    Endpoint.DisplayName
    Endpoint.Name
    Endpoint.FriendlyName
    Endpoint.Serializer
    Endpoint.Encryption
    Endpoint.MessageValidationMode
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging
    Assembly: Silverback.Integration.MQTT.dll
    Syntax
    public sealed class MqttConsumerEndpoint : ConsumerEndpoint, IConsumerEndpoint, IEndpoint, IEquatable<MqttConsumerEndpoint>

    Constructors

    | Improve this doc View source

    MqttConsumerEndpoint(params string[])

    Initializes a new instance of the MqttConsumerEndpoint class.

    Declaration
    public MqttConsumerEndpoint(params string[] topics)
    Parameters
    Type Name Description
    string[] topics

    The name of the topics or the topic filter strings.

    Properties

    | Improve this doc View source

    BackpressureLimit

    Gets or sets the maximum number of messages to be consumed and enqueued waiting to be processed. The default is 1.

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

    Configuration

    Gets or sets the MQTT client configuration. This is actually a wrapper around the MQTTnet.Client.MqttClientOptions from the MQTTnet library.

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

    MaxDegreeOfParallelism

    Gets or sets the maximum number of incoming message that can be processed concurrently. The default is 1.

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

    QualityOfServiceLevel

    Gets or sets the quality of service level (at most once, at least once or exactly once). The default is MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce.

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

    Topics

    Gets the name of the topics or the topic filter strings.

    Declaration
    public IReadOnlyCollection<string> Topics { get; }
    Property Value
    Type Description
    IReadOnlyCollection<string>

    Methods

    | Improve this doc View source

    Equals(MqttConsumerEndpoint?)

    Indicates whether the current object is equal to another object of the same type.

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

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to the other parameter; otherwise, false.

    | Improve this doc View source

    Equals(object?)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)
    | Improve this doc View source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()
    | 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 override string GetUniqueConsumerGroupName()
    Returns
    Type Description
    string

    Returns the unique name for the consumer group.

    Overrides
    ConsumerEndpoint.GetUniqueConsumerGroupName()
    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
    ConsumerEndpoint.Validate()

    Implements

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