Table of Contents

Class MqttSettings

Namespace
nanoFramework.M2Mqtt
Assembly
nanoFramework.M2Mqtt.dll

Settings class for the MQTT broker

public class MqttSettings
Inheritance
MqttSettings
Inherited Members
Extension Methods

Fields

BrokerDefaultPort

Default port for the MQTT protocol

public const int BrokerDefaultPort = 1883

Field Value

int

BrokerDefaultSslPort

Default SSL port for the MQTT protocol

public const int BrokerDefaultSslPort = 8883

Field Value

int

ConnectTimeout

Connection Timeout

public const int ConnectTimeout = 30000

Field Value

int

Remarks

The broker needs to receive the first message (CONNECT) within a reasonable amount of time after the initial TCP/IP connection

DefaultDelayRetry

Delay for retry publish, subscribe and unsubscribe for QoS Level 1 or 2. This is in ticks, equivalent of 1 second.

public const int DefaultDelayRetry = 10000000

Field Value

int

DefaultInflightQueueSize

The default inflight queue size

public const int DefaultInflightQueueSize = 2147483647

Field Value

int

DefaultTimeout

Default timeout on receiving from client

public const int DefaultTimeout = 30000

Field Value

int

MaximumAttemptsRetry

Max publish, subscribe and unsubscribe retry for QoS Level 1 or 2

public const int MaximumAttemptsRetry = 3

Field Value

int

Properties

AttemptsOnRetry

Attempts on retry

public int AttemptsOnRetry { get; }

Property Value

int

DelayOnRetry

Delay on retry

public int DelayOnRetry { get; }

Property Value

int

InflightQueueSize

Inflight queue size

public int InflightQueueSize { get; set; }

Property Value

int

Instance

Singleton instance of settings

public static MqttSettings Instance { get; }

Property Value

MqttSettings

Port

Listening connection port

public int Port { get; }

Property Value

int

SslPort

Listening connection SSL port

public int SslPort { get; }

Property Value

int

TimeoutOnConnection

Timeout on client connection (before receiving CONNECT message)

public int TimeoutOnConnection { get; }

Property Value

int

TimeoutOnReceiving

Timeout on receiving

public int TimeoutOnReceiving { get; }

Property Value

int

ValidateServerCertificate

True to check the server certificate when connection using TLS. Disabling this property will bypass the validation of the server root CA certificate. Using the library this way it's unsecured and, therefore, not recommended.

public bool ValidateServerCertificate { get; set; }

Property Value

bool