Table of Contents

Class MqttApplicationMessageReceivedEventArgs

Namespace
MQTTnet.Client
Assembly
MQTTnet.dll
public sealed class MqttApplicationMessageReceivedEventArgs : EventArgs
Inheritance
MqttApplicationMessageReceivedEventArgs
Inherited Members

Constructors

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

public MqttApplicationMessageReceivedEventArgs(string clientId, MqttApplicationMessage applicationMessage, MqttPublishPacket publishPacket, Func<MqttApplicationMessageReceivedEventArgs, CancellationToken, Task> acknowledgeHandler)

Parameters

clientId string
applicationMessage MqttApplicationMessage
publishPacket MqttPublishPacket
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; }

Property Value

ushort

ProcessingFailed

Indicates if the processing of this PUBLISH packet has failed. If the processing has failed the client will not send an ACK packet etc.

public bool ProcessingFailed { get; set; }

Property Value

bool

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