Class MqttClientPublishResult
public sealed class MqttClientPublishResult
- Inheritance
-
MqttClientPublishResult
- Inherited Members
Constructors
MqttClientPublishResult(ushort?, MqttClientPublishReasonCode, string, IReadOnlyCollection<MqttUserProperty>)
public MqttClientPublishResult(ushort? packetIdentifier, MqttClientPublishReasonCode reasonCode, string reasonString, IReadOnlyCollection<MqttUserProperty> userProperties)
Parameters
packetIdentifier
ushort?reasonCode
MqttClientPublishReasonCodereasonString
stringuserProperties
IReadOnlyCollection<MqttUserProperty>
Properties
IsSuccess
Returns if the overall status of the publish is a success. This can be the reason code Success or NoMatchingSubscribers. NoMatchingSubscribers usually indicates only that no other client is interested in the topic but overall transmit to the server etc. was a success.
public bool IsSuccess { get; }
Property Value
PacketIdentifier
Gets the packet identifier which was used for this publish.
public ushort? PacketIdentifier { get; }
Property Value
ReasonCode
Gets or sets the reason code.
public MqttClientPublishReasonCode ReasonCode { get; }
Property Value
ReasonString
Gets or sets the reason string.
public string ReasonString { get; }
Property Value
UserProperties
Gets or sets the user properties.
In MQTT 5, user properties are basic UTF-8 string key-value pairs that you can append to almost every type of MQTT
packet.
As long as you don’t exceed the maximum message size, you can use an unlimited number of user properties to add
metadata to MQTT messages and pass information between publisher, broker, and subscriber.
The feature is very similar to the HTTP header concept.
public IReadOnlyCollection<MqttUserProperty> UserProperties { get; }