Show / Hide Table of Contents

    Interface IMqttLastWillMessageBuilder

    Builds the last will and testament (LWT) message related part of the MqttClientConfig.

    Namespace: Silverback.Messaging.Configuration.Mqtt
    Assembly: Silverback.Integration.MQTT.dll
    Syntax
    public interface IMqttLastWillMessageBuilder

    Methods

    | Improve this doc View source

    AddUserProperty(string, string)

    Adds a user property to be sent with the will message.

    Declaration
    IMqttLastWillMessageBuilder AddUserProperty(string name, string value)
    Parameters
    Type Name Description
    string name

    The property name.

    string value

    The property value.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    Message(object)

    Specifies the LWT message to be published.

    Declaration
    IMqttLastWillMessageBuilder Message(object message)
    Parameters
    Type Name Description
    object message

    The actual LWT message to be published.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    ProduceTo(string)

    Specifies the name of the topic to produce the LWT message to.

    Declaration
    IMqttLastWillMessageBuilder ProduceTo(string topicName)
    Parameters
    Type Name Description
    string topicName

    The name of the topic.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    Retain()

    Specifies that the LWT message will be sent with the retain flag, causing it to be persisted on the broker.

    Declaration
    IMqttLastWillMessageBuilder Retain()
    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    SerializeAsJson(Action<IJsonMessageSerializerBuilder>?)

    Sets the serializer to an instance of JsonMessageSerializer (or JsonMessageSerializer<TMessage>) to serialize the produced messages as JSON.

    Declaration
    IMqttLastWillMessageBuilder SerializeAsJson(Action<IJsonMessageSerializerBuilder>? serializerBuilderAction = null)
    Parameters
    Type Name Description
    Action<IJsonMessageSerializerBuilder> serializerBuilderAction

    An optional Action<T> that takes the IJsonMessageSerializerBuilder and configures it.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    SerializeUsing(IMessageSerializer)

    Specifies the IMessageSerializer to be used to serialize the LWT message.

    Declaration
    IMqttLastWillMessageBuilder SerializeUsing(IMessageSerializer serializer)
    Parameters
    Type Name Description
    IMessageSerializer serializer

    The IMessageSerializer.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    WithAtLeastOnceQoS()

    Specifies that the LWT message has to be sent with the at least once quality of service level.

    Declaration
    IMqttLastWillMessageBuilder WithAtLeastOnceQoS()
    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    WithAtMostOnceQoS()

    Specifies that the LWT message has to be sent with the at most once quality of service level.

    Declaration
    IMqttLastWillMessageBuilder WithAtMostOnceQoS()
    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    WithContentType(string?)

    Specifies the content type.

    Declaration
    IMqttLastWillMessageBuilder WithContentType(string? contentType)
    Parameters
    Type Name Description
    string contentType

    The content type.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    WithCorrelationData(byte[]?)

    Specifies the correlation data.

    Declaration
    IMqttLastWillMessageBuilder WithCorrelationData(byte[]? correlationData)
    Parameters
    Type Name Description
    byte[] correlationData

    The correlation data.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    WithDelay(TimeSpan)

    Specifies the LWT message delay.

    Declaration
    IMqttLastWillMessageBuilder WithDelay(TimeSpan delay)
    Parameters
    Type Name Description
    TimeSpan delay

    The TimeSpan representing the delay.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    WithExactlyOnceQoS()

    Specifies that the LWT message has to be sent with the exactly once quality of service level.

    Declaration
    IMqttLastWillMessageBuilder WithExactlyOnceQoS()
    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    WithPayloadFormatIndicator(MqttPayloadFormatIndicator)

    Specifies the payload format indicator.

    Declaration
    IMqttLastWillMessageBuilder WithPayloadFormatIndicator(MqttPayloadFormatIndicator formatIndicator)
    Parameters
    Type Name Description
    MqttPayloadFormatIndicator formatIndicator

    The format indicator.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    WithQualityOfServiceLevel(MqttQualityOfServiceLevel)

    Specifies the desired quality of service level.

    Declaration
    IMqttLastWillMessageBuilder WithQualityOfServiceLevel(MqttQualityOfServiceLevel qosLevel)
    Parameters
    Type Name Description
    MqttQualityOfServiceLevel qosLevel

    The MQTTnet.Protocol.MqttQualityOfServiceLevel.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

    | Improve this doc View source

    WithResponseTopic(string?)

    Specifies the response topic.

    Declaration
    IMqttLastWillMessageBuilder WithResponseTopic(string? topic)
    Parameters
    Type Name Description
    string topic

    The response topic.

    Returns
    Type Description
    IMqttLastWillMessageBuilder

    The IMqttLastWillMessageBuilder so that additional calls can be chained.

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