Class MqttLastWillMessageConfiguration
- Namespace
- Silverback.Messaging.Configuration.Mqtt
- Assembly
- Silverback.Integration.MQTT.dll
The configuration of the last will message to be sent when the client disconnects ungracefully.
public record MqttLastWillMessageConfiguration : IValidatableSettings, IEquatable<MqttLastWillMessageConfiguration>
- Inheritance
-
MqttLastWillMessageConfiguration
- Implements
- Inherited Members
Constructors
MqttLastWillMessageConfiguration()
public MqttLastWillMessageConfiguration()
MqttLastWillMessageConfiguration(MqttLastWillMessageConfiguration)
protected MqttLastWillMessageConfiguration(MqttLastWillMessageConfiguration original)
Parameters
originalMqttLastWillMessageConfiguration
Properties
ContentType
Gets the content type. This is an MQTT 5.0 feature: setting it with an earlier protocol version makes the connection fail.
public string? ContentType { get; init; }
Property Value
CorrelationData
Gets the correlation data. This is an MQTT 5.0 feature: setting it with an earlier protocol version makes the connection fail.
public byte[]? CorrelationData { get; init; }
Property Value
- 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. This is an MQTT 5.0 feature: setting it with an earlier protocol version makes the connection fail.
public uint Delay { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Expiration
Gets the message expiry interval. This is an MQTT 5.0 feature: setting it with an earlier protocol version makes the connection fail.
public uint Expiration { get; init; }
Property Value
Payload
Gets the message payload.
public byte[]? Payload { get; init; }
Property Value
- byte[]
PayloadFormatIndicator
Gets the payload format indicator. This is an MQTT 5.0 feature: setting it with an earlier protocol version makes the connection fail.
public MqttPayloadFormatIndicator PayloadFormatIndicator { get; init; }
Property Value
- MqttPayloadFormatIndicator
QualityOfServiceLevel
Gets the quality of service level (at most once, at least once or exactly once). The default is MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce.
public MqttQualityOfServiceLevel QualityOfServiceLevel { get; init; }
Property Value
- MqttQualityOfServiceLevel
ResponseTopic
Gets the response topic. This is an MQTT 5.0 feature: setting it with an earlier protocol version makes the connection fail.
public string? ResponseTopic { get; init; }
Property Value
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.
public bool Retain { get; init; }
Property Value
Topic
Gets the target topic.
public string Topic { get; init; }
Property Value
UserProperties
Gets the user properties of the will message. This is an MQTT 5.0 feature: setting it with an earlier protocol version makes the connection fail.
public IValueReadOnlyCollection<MqttUserProperty> UserProperties { get; init; }
Property Value
Methods
Equals(MqttLastWillMessageConfiguration?)
public virtual bool Equals(MqttLastWillMessageConfiguration? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Validate()
Throws a SilverbackConfigurationException if the configuration is not valid.
public void Validate()
Exceptions
- SilverbackConfigurationException
The configuration is not valid.
Operators
operator ==(MqttLastWillMessageConfiguration?, MqttLastWillMessageConfiguration?)
public static bool operator ==(MqttLastWillMessageConfiguration? left, MqttLastWillMessageConfiguration? right)
Parameters
Returns
operator !=(MqttLastWillMessageConfiguration?, MqttLastWillMessageConfiguration?)
public static bool operator !=(MqttLastWillMessageConfiguration? left, MqttLastWillMessageConfiguration? right)