Table of Contents

Method CreateMqttClientAgentAsync

Namespace
Kepware.Api.ClientHandler
Assembly
Kepware.Api.dll

CreateMqttClientAgentAsync(string, IDictionary<string, object>?, CancellationToken)

Creates a new MQTT Client agent with the specified name.

public Task<MqttClientAgent?> CreateMqttClientAgentAsync(string name, IDictionary<string, object>? properties = null, CancellationToken cancellationToken = default)

Parameters

name string

The name of the agent.

properties IDictionary<string, object>

Optional properties to set on the agent.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<MqttClientAgent>

The created MqttClientAgent, or null if creation failed.

Exceptions

ArgumentException

Thrown when the name is null or empty.