Table of Contents

Class MqttClientOptions

Namespace
Pamoja.Mqtt
Assembly
Pamoja.Mqtt.dll

Connection settings for an MqttClient.

public sealed class MqttClientOptions
Inheritance
MqttClientOptions
Inherited Members

Remarks

Constructed with object-initializer syntax; only ClientId, Host, and Port are required, and the optional fields fall back to the core defaults when left null.

Properties

Capacity

Bound on outstanding client requests. Defaults to 64 when null.

public uint? Capacity { get; init; }

Property Value

uint?

ClientId

The MQTT client identifier presented to the broker.

public required string ClientId { get; init; }

Property Value

string

Host

The broker hostname or IP address.

public required string Host { get; init; }

Property Value

string

KeepAliveSecs

Keep-alive interval in seconds. Defaults to 30 when null.

public uint? KeepAliveSecs { get; init; }

Property Value

uint?

Port

The broker TCP port, conventionally 1883 for plaintext MQTT.

public required ushort Port { get; init; }

Property Value

ushort

Qos

Default quality of service. Defaults to AtLeastOnce when null.

public Qos? Qos { get; init; }

Property Value

Qos?