Table of Contents

Class MqttApplicationMessageReceivedEventArgs

Namespace
Azure.Iot.Operations.Protocol.Events
Assembly
Azure.Iot.Operations.Protocol.dll
public sealed class MqttApplicationMessageReceivedEventArgs : EventArgs
Inheritance
MqttApplicationMessageReceivedEventArgs
Inherited Members

Constructors

MqttApplicationMessageReceivedEventArgs(string, MqttApplicationMessage, ushort, Func<MqttApplicationMessageReceivedEventArgs, CancellationToken, Task>)

public MqttApplicationMessageReceivedEventArgs(string clientId, MqttApplicationMessage applicationMessage, ushort packetId, Func<MqttApplicationMessageReceivedEventArgs, CancellationToken, Task> acknowledgeHandler)

Parameters

clientId string
applicationMessage MqttApplicationMessage
packetId ushort
acknowledgeHandler Func<MqttApplicationMessageReceivedEventArgs, CancellationToken, Task>

Properties

ApplicationMessage

public MqttApplicationMessage ApplicationMessage { get; }

Property Value

MqttApplicationMessage

AutoAcknowledge

Gets or sets whether the library should send MQTT ACK packets automatically if required.

public bool AutoAcknowledge { get; set; }

Property Value

bool

ClientId

Gets the client identifier. Hint: This identifier needs to be unique over all used clients / devices on the broker to avoid connection issues.

public string ClientId { get; }

Property Value

string

IsHandled

Gets or sets whether this message was handled. This value can be used in user code for custom control flow.

public bool IsHandled { get; set; }

Property Value

bool

PacketIdentifier

Gets the identifier of the MQTT packet

public ushort PacketIdentifier { get; set; }

Property Value

ushort

ReasonCode

Gets or sets the reason code which will be sent to the server.

public MqttApplicationMessageReceivedReasonCode ReasonCode { get; set; }

Property Value

MqttApplicationMessageReceivedReasonCode

ResponseReasonString

Gets or sets the reason string which will be sent to the server in the ACK packet.

public string? ResponseReasonString { get; set; }

Property Value

string

ResponseUserProperties

Gets or sets the user properties which will be sent to the server in the ACK packet etc.

public List<MqttUserProperty> ResponseUserProperties { get; }

Property Value

List<MqttUserProperty>

Tag

public object? Tag { get; set; }

Property Value

object

Methods

AcknowledgeAsync(CancellationToken)

public Task AcknowledgeAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task