Table of Contents

Class MqttSessionExpiredException

Namespace
Azure.Iot.Operations.Mqtt.Session.Exceptions
Assembly
Azure.Iot.Operations.Mqtt.dll

This exception is thrown when an MQTT session could not be recovered by the client before it expired on the broker.

public class MqttSessionExpiredException : Exception, ISerializable
Inheritance
MqttSessionExpiredException
Implements
Inherited Members

Remarks

The session expiry interval can be set when first establishing a connection. If the client loses connection to the broker and then that interval passes without the client successfully reconnecting, then the broker will discard the session. Upon a successful reconnection after this happens, this exception will be given by IMqttSessionClient.DisconnectedAsync.

To avoid this exception, longer values of the session expiry interval are recommended.

Constructors

MqttSessionExpiredException()

public MqttSessionExpiredException()

MqttSessionExpiredException(string?)

public MqttSessionExpiredException(string? message)

Parameters

message string

MqttSessionExpiredException(string?, Exception?)

public MqttSessionExpiredException(string? message, Exception? innerException)

Parameters

message string
innerException Exception