Show / Hide Table of Contents

    Class MqttProducerEndpoint

    Represents a topic to produce to.

    Inheritance
    object
    Endpoint
    ProducerEndpoint
    MqttProducerEndpoint
    Implements
    IProducerEndpoint
    IEndpoint
    IEquatable<MqttProducerEndpoint>
    Inherited Members
    ProducerEndpoint.Chunk
    ProducerEndpoint.Strategy
    ProducerEndpoint.MessageEnrichers
    ProducerEndpoint.GetActualName(IOutboundEnvelope, IServiceProvider)
    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 MqttProducerEndpoint : ProducerEndpoint, IProducerEndpoint, IEndpoint, IEquatable<MqttProducerEndpoint>

    Constructors

    | Improve this doc View source

    MqttProducerEndpoint(Func<IOutboundEnvelope, IServiceProvider, string?>)

    Initializes a new instance of the MqttProducerEndpoint class.

    Declaration
    public MqttProducerEndpoint(Func<IOutboundEnvelope, IServiceProvider, string?> topicNameFunction)
    Parameters
    Type Name Description
    Func<IOutboundEnvelope, IServiceProvider, string> topicNameFunction

    The function returning the topic name for the message being produced. If the function returns null the message will not be produced.

    | Improve this doc View source

    MqttProducerEndpoint(Func<IOutboundEnvelope, string?>)

    Initializes a new instance of the MqttProducerEndpoint class.

    Declaration
    public MqttProducerEndpoint(Func<IOutboundEnvelope, string?> topicNameFunction)
    Parameters
    Type Name Description
    Func<IOutboundEnvelope, string> topicNameFunction

    The function returning the topic name for the message being produced. If the function returns null the message will not be produced.

    | Improve this doc View source

    MqttProducerEndpoint(string)

    Initializes a new instance of the MqttProducerEndpoint class.

    Declaration
    public MqttProducerEndpoint(string topicName)
    Parameters
    Type Name Description
    string topicName

    The name of the topic.

    | Improve this doc View source

    MqttProducerEndpoint(string, Func<IOutboundEnvelope, string[]>)

    Initializes a new instance of the MqttProducerEndpoint class.

    Declaration
    public MqttProducerEndpoint(string topicNameFormatString, Func<IOutboundEnvelope, string[]> topicNameArgumentsFunction)
    Parameters
    Type Name Description
    string topicNameFormatString

    The endpoint name format string that will be combined with the arguments returned by the topicNameArgumentsFunction using a string.Format.

    Func<IOutboundEnvelope, string[]> topicNameArgumentsFunction

    The function returning the arguments to be used to format the string.

    | Improve this doc View source

    MqttProducerEndpoint(Type)

    Initializes a new instance of the MqttProducerEndpoint class.

    Declaration
    public MqttProducerEndpoint(Type resolverType)
    Parameters
    Type Name Description
    Type resolverType

    The type of the IProducerEndpointNameResolver to be used to resolve the actual endpoint name.

    Properties

    | 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

    MessageExpiryInterval

    Gets or sets the message expiry interval in seconds. This interval defines the period of time that the broker stores the PUBLISH message for any matching subscribers that are not currently connected. When no message expiry interval is set, the broker must store the message for matching subscribers indefinitely.

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

    QualityOfServiceLevel

    Gets or sets the quality of service level (at most once, at least once or exactly once).

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

    Retain

    Gets or sets a value indicating whether the message have to be sent with the retain flag, causing them to be persisted on the broker.

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

    Methods

    | Improve this doc View source

    Equals(MqttProducerEndpoint?)

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

    Declaration
    public bool Equals(MqttProducerEndpoint? other)
    Parameters
    Type Name Description
    MqttProducerEndpoint 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

    Validate()

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

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

    Implements

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