Show / Hide Table of Contents

    Class MqttLastWillMessageConfiguration

    The configuration of the last will message to be sent when the client disconnects ungracefully.

    Inheritance
    object
    MqttLastWillMessageConfiguration
    Implements
    IValidatableSettings
    IEquatable<MqttLastWillMessageConfiguration>
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: Silverback.Messaging.Configuration.Mqtt
    Assembly: Silverback.Integration.MQTT.dll
    Syntax
    public record MqttLastWillMessageConfiguration : IValidatableSettings, IEquatable<MqttLastWillMessageConfiguration>

    Constructors

    MqttLastWillMessageConfiguration()

    The configuration of the last will message to be sent when the client disconnects ungracefully.

    Declaration
    public MqttLastWillMessageConfiguration()

    MqttLastWillMessageConfiguration(MqttLastWillMessageConfiguration)

    The configuration of the last will message to be sent when the client disconnects ungracefully.

    Declaration
    protected MqttLastWillMessageConfiguration(MqttLastWillMessageConfiguration original)
    Parameters
    Type Name Description
    MqttLastWillMessageConfiguration original

    Properties

    ContentType

    Gets the content type.

    Declaration
    public string? ContentType { get; init; }
    Property Value
    Type Description
    string

    CorrelationData

    Gets the correlation data.

    Declaration
    public byte[]? CorrelationData { get; init; }
    Property Value
    Type Description
    byte[]

    Delay

    Gets the number of seconds to wait before sending the last will message. If the client reconnects between this interval the message will not be sent.

    Declaration
    public uint Delay { get; init; }
    Property Value
    Type Description
    uint

    EqualityContract

    The configuration of the last will message to be sent when the client disconnects ungracefully.

    Declaration
    protected virtual Type EqualityContract { get; }
    Property Value
    Type Description
    Type

    Expiration

    Gets the message expiry interval.

    Declaration
    public uint Expiration { get; init; }
    Property Value
    Type Description
    uint

    Payload

    Gets the message payload.

    Declaration
    public byte[]? Payload { get; init; }
    Property Value
    Type Description
    byte[]

    PayloadFormatIndicator

    Gets the payload format indicator.

    Declaration
    public MqttPayloadFormatIndicator PayloadFormatIndicator { get; init; }
    Property Value
    Type Description
    MqttPayloadFormatIndicator

    QualityOfServiceLevel

    Gets 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; init; }
    Property Value
    Type Description
    MqttQualityOfServiceLevel

    ResponseTopic

    Gets the response topic.

    Declaration
    public string? ResponseTopic { get; init; }
    Property Value
    Type Description
    string

    Retain

    Gets a value indicating whether the message have to be sent with the retain flag, causing them to be persisted on the broker. The default is false.

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

    Topic

    Gets the target topic.

    Declaration
    public string Topic { get; init; }
    Property Value
    Type Description
    string

    UserProperties

    Gets the user properties of the will message.

    Declaration
    public IValueReadOnlyCollection<MqttUserProperty> UserProperties { get; init; }
    Property Value
    Type Description
    IValueReadOnlyCollection<MqttUserProperty>

    Methods

    Equals(MqttLastWillMessageConfiguration?)

    The configuration of the last will message to be sent when the client disconnects ungracefully.

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

    Equals(object?)

    The configuration of the last will message to be sent when the client disconnects ungracefully.

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

    GetHashCode()

    The configuration of the last will message to be sent when the client disconnects ungracefully.

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

    PrintMembers(StringBuilder)

    The configuration of the last will message to be sent when the client disconnects ungracefully.

    Declaration
    protected virtual bool PrintMembers(StringBuilder builder)
    Parameters
    Type Name Description
    StringBuilder builder
    Returns
    Type Description
    bool

    ToString()

    The configuration of the last will message to be sent when the client disconnects ungracefully.

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

    Validate()

    Throws a SilverbackConfigurationException if the configuration is not valid.

    Declaration
    public void Validate()

    Operators

    operator ==(MqttLastWillMessageConfiguration?, MqttLastWillMessageConfiguration?)

    The configuration of the last will message to be sent when the client disconnects ungracefully.

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

    operator !=(MqttLastWillMessageConfiguration?, MqttLastWillMessageConfiguration?)

    The configuration of the last will message to be sent when the client disconnects ungracefully.

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

    Implements

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