Class MqttClientConfigurationBuilder
- Namespace
- Silverback.Messaging.Configuration.Mqtt
- Assembly
- Silverback.Integration.MQTT.dll
Builds the MqttClientConfiguration.
public class MqttClientConfigurationBuilder
- Inheritance
-
MqttClientConfigurationBuilder
- Inherited Members
Constructors
MqttClientConfigurationBuilder(IServiceProvider)
Initializes a new instance of the MqttClientConfigurationBuilder class.
public MqttClientConfigurationBuilder(IServiceProvider serviceProvider)
Parameters
serviceProviderIServiceProviderThe IServiceProvider to be used to resolve the required services.
Properties
ServiceProvider
Gets the IServiceProvider instance to be used to resolve the required services.
public IServiceProvider ServiceProvider { get; }
Property Value
Methods
AddUserProperty(string, string?)
Adds a user property to be sent with the CONNECT packet. It can be used to send connection related properties from the client to the server.
public MqttClientConfigurationBuilder AddUserProperty(string name, string? value)
Parameters
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
AllowPacketFragmentation()
Allow packet fragmentation. This is the default, use DisablePacketFragmentation() to turn it off.
public MqttClientConfigurationBuilder AllowPacketFragmentation()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Build()
Builds the MqttClientConfiguration instance.
public MqttClientConfiguration Build()
Returns
ConnectTo(string)
Specifies the URI of the MQTT server.
public MqttClientConfigurationBuilder ConnectTo(string serverUri)
Parameters
serverUristringThe URI of the MQTT server.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
ConnectTo(Uri)
Specifies the URI of the MQTT server.
public MqttClientConfigurationBuilder ConnectTo(Uri serverUri)
Parameters
serverUriUriThe URI of the MQTT server.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
ConnectViaTcp(Action<MqttClientTcpConfigurationBuilder>)
Specifies the TCP connection settings using only a builder action to configure all TCP options.
public MqttClientConfigurationBuilder ConnectViaTcp(Action<MqttClientTcpConfigurationBuilder> tcpConfigurationBuilderAction)
Parameters
tcpConfigurationBuilderActionAction<MqttClientTcpConfigurationBuilder>The action that configures the MqttClientTcpConfigurationBuilder.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
ConnectViaTcp(EndPoint, Action<MqttClientTcpConfigurationBuilder>?)
Specifies the TCP connection settings using an EndPoint and an optional builder to configure additional TCP options.
public MqttClientConfigurationBuilder ConnectViaTcp(EndPoint endpoint, Action<MqttClientTcpConfigurationBuilder>? tcpConfigurationBuilderAction = null)
Parameters
endpointEndPointThe remote endpoint.
tcpConfigurationBuilderActionAction<MqttClientTcpConfigurationBuilder>An optional action that configures the MqttClientTcpConfigurationBuilder.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
ConnectViaTcp(string, Action<MqttClientTcpConfigurationBuilder>?)
Specifies the TCP connection settings using the host name and an optional builder to configure additional TCP options.
public MqttClientConfigurationBuilder ConnectViaTcp(string host, Action<MqttClientTcpConfigurationBuilder>? tcpConfigurationBuilderAction = null)
Parameters
hoststringThe server host name or IP address.
tcpConfigurationBuilderActionAction<MqttClientTcpConfigurationBuilder>An optional action that configures the MqttClientTcpConfigurationBuilder.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
ConnectViaTcp(string, int, Action<MqttClientTcpConfigurationBuilder>?)
Specifies the TCP connection settings using the host name, port and an optional builder to configure additional TCP options.
public MqttClientConfigurationBuilder ConnectViaTcp(string host, int port, Action<MqttClientTcpConfigurationBuilder>? tcpConfigurationBuilderAction = null)
Parameters
hoststringThe server host name or IP address.
portintThe server port.
tcpConfigurationBuilderActionAction<MqttClientTcpConfigurationBuilder>An optional action that configures the MqttClientTcpConfigurationBuilder.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
ConnectViaWebSocket(Action<MqttClientWebSocketConfigurationBuilder>)
Specifies the WebSocket connection settings.
public MqttClientConfigurationBuilder ConnectViaWebSocket(Action<MqttClientWebSocketConfigurationBuilder> webSocketConfigurationBuilderAction)
Parameters
webSocketConfigurationBuilderActionAction<MqttClientWebSocketConfigurationBuilder>The action that configures the MqttClientWebSocketConfigurationBuilder.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
ConnectViaWebSocket(string, Action<MqttClientWebSocketConfigurationBuilder>?)
Specifies the WebSocket connection settings.
public MqttClientConfigurationBuilder ConnectViaWebSocket(string uri, Action<MqttClientWebSocketConfigurationBuilder>? webSocketConfigurationBuilderAction = null)
Parameters
uristringThe server URI.
webSocketConfigurationBuilderActionAction<MqttClientWebSocketConfigurationBuilder>The action that configures the MqttClientWebSocketConfigurationBuilder.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Consume(Action<MqttConsumerEndpointConfigurationBuilder<object>>)
Adds a consumer endpoint, which is a topic or a group of topics that share the same configuration (deserializer, error policies, etc.).
public MqttClientConfigurationBuilder Consume(Action<MqttConsumerEndpointConfigurationBuilder<object>> configurationBuilderAction)
Parameters
configurationBuilderActionAction<MqttConsumerEndpointConfigurationBuilder<object>>An Action that takes the MqttClientConfigurationBuilder and configures it.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Consume(string?, Action<MqttConsumerEndpointConfigurationBuilder<object>>)
Adds a consumer endpoint, which is a topic or a group of topics that share the same configuration (deserializer, error policies, etc.).
public MqttClientConfigurationBuilder Consume(string? name, Action<MqttConsumerEndpointConfigurationBuilder<object>> configurationBuilderAction)
Parameters
namestringThe name is used to guarantee that a duplicated configuration is discarded and is also displayed in the logs. By default, the name will be generated concatenating the topic name(s).
configurationBuilderActionAction<MqttConsumerEndpointConfigurationBuilder<object>>An Action that takes the MqttClientConfigurationBuilder and configures it.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Consume<TMessage>(Action<MqttConsumerEndpointConfigurationBuilder<TMessage>>)
Adds a consumer endpoint, which is a topic or a group of topics that share the same configuration (deserializer, error policies, etc.).
public MqttClientConfigurationBuilder Consume<TMessage>(Action<MqttConsumerEndpointConfigurationBuilder<TMessage>> configurationBuilderAction)
Parameters
configurationBuilderActionAction<MqttConsumerEndpointConfigurationBuilder<TMessage>>An Action that takes the MqttClientConfigurationBuilder and configures it.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Type Parameters
TMessageThe type (or base type) of the messages being consumed. This is used to setup the deserializer and will determine the type of the message parameter in the nested configuration functions.
Consume<TMessage>(string?, Action<MqttConsumerEndpointConfigurationBuilder<TMessage>>)
Adds a consumer endpoint, which is a topic or a group of topics that share the same configuration (deserializer, error policies, etc.).
public MqttClientConfigurationBuilder Consume<TMessage>(string? name, Action<MqttConsumerEndpointConfigurationBuilder<TMessage>> configurationBuilderAction)
Parameters
namestringThe name is used to guarantee that a duplicated configuration is discarded and is also displayed in the logs. By default, the name will be generated concatenating the topic name(s).
configurationBuilderActionAction<MqttConsumerEndpointConfigurationBuilder<TMessage>>An Action that takes the MqttClientConfigurationBuilder and configures it.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Type Parameters
TMessageThe type (or base type) of the messages being consumed. This is used to setup the deserializer and will determine the type of the message parameter in the nested configuration functions.
DisableKeepAlive()
Disables the keep alive mechanism. No ping packet will be sent.
public MqttClientConfigurationBuilder DisableKeepAlive()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
DisablePacketFragmentation()
Disables packet fragmentation. This is necessary when the broker does not support it.
public MqttClientConfigurationBuilder DisablePacketFragmentation()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
DisableParallelProcessing()
Disables parallel messages processing, setting the max degree of parallelism to 1 (default).
public MqttClientConfigurationBuilder DisableParallelProcessing()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
DisableProblemInformation()
Specifies that the reason string or user properties can be sent with CONNACK or DISCONNECT packets only.
public MqttClientConfigurationBuilder DisableProblemInformation()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
DisableResponseInformation()
Specifies that the server should not return the response information in the CONNACK packet. This is usually the default.
public MqttClientConfigurationBuilder DisableResponseInformation()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
DisableTls()
Disables TLS. The network traffic will not be encrypted.
public MqttClientConfigurationBuilder DisableTls()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
DisableTryPrivate()
Disables the TryPrivate.
public MqttClientConfigurationBuilder DisableTryPrivate()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
EnableParallelProcessing(int)
Enables parallel processing and sets the maximum number of incoming messages that can be processed concurrently.
public MqttClientConfigurationBuilder EnableParallelProcessing(int maxDegreeOfParallelism)
Parameters
maxDegreeOfParallelismintThe maximum number of incoming messages that can be processed concurrently.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
EnableTls(Action<MqttClientTlsConfigurationBuilder>?)
Specifies that TLS has to be used to encrypt the network traffic.
public MqttClientConfigurationBuilder EnableTls(Action<MqttClientTlsConfigurationBuilder>? tlsConfigurationBuilderAction = null)
Parameters
tlsConfigurationBuilderActionAction<MqttClientTlsConfigurationBuilder>The action that configures the MqttClientTlsConfigurationBuilder.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
EnableTryPrivate()
Specifies that the bridge must attempt to indicate to the remote broker that it is a bridge and not an ordinary client. If successful, this means that the loop detection will be more effective and that the retained messages will be propagated correctly. Not all brokers support this feature, so it may be necessary to disable it if your bridge does not connect properly.
public MqttClientConfigurationBuilder EnableTryPrivate()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
LimitBackpressure(int)
Sets the maximum number of messages to be consumed and enqueued waiting to be processed. The limit will be applied per partition when processing the partitions independently (default). The default limit is 2.
public MqttClientConfigurationBuilder LimitBackpressure(int backpressureLimit)
Parameters
backpressureLimitintThe maximum number of messages to be enqueued.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
LimitPacketSize(long)
Sets the maximum packet size in byte the client will process. The default is no limit.
public MqttClientConfigurationBuilder LimitPacketSize(long maximumPacketSize)
Parameters
maximumPacketSizelongThe maximum packet size.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
LimitTopicAlias(int)
Sets the maximum number of topic aliases the server can send in the PUBLISH packet. The default is 0, meaning that no alias can be sent.
public MqttClientConfigurationBuilder LimitTopicAlias(int topicAliasMaximum)
Parameters
topicAliasMaximumintThe maximum number of topic aliases.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
LimitUnacknowledgedPublications(int)
Sets the maximum number of QoS 1 and QoS 2 publications that can be received and processed
concurrently. The default value is null, that means 65'535.
public MqttClientConfigurationBuilder LimitUnacknowledgedPublications(int receiveMaximum)
Parameters
receiveMaximumintThe maximum number of concurrent publications.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Remarks
There is no mechanism to limit the QoS 0 publications that the Server might try to send.
Produce(Action<MqttProducerEndpointConfigurationBuilder<object>>)
Adds a producer endpoint, which is a topic and its related configuration (serializer, etc.).
public MqttClientConfigurationBuilder Produce(Action<MqttProducerEndpointConfigurationBuilder<object>> configurationBuilderAction)
Parameters
configurationBuilderActionAction<MqttProducerEndpointConfigurationBuilder<object>>An Action that takes the MqttClientConfigurationBuilder and configures it.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Produce(string?, Action<MqttProducerEndpointConfigurationBuilder<object>>)
Adds a producer endpoint, which is a topic and its related configuration (serializer, etc.).
public MqttClientConfigurationBuilder Produce(string? name, Action<MqttProducerEndpointConfigurationBuilder<object>> configurationBuilderAction)
Parameters
namestringThe name is used to guarantee that a duplicated configuration is discarded and is also displayed in the logs. By default, the name will be generated concatenating the topic name and the message type.
configurationBuilderActionAction<MqttProducerEndpointConfigurationBuilder<object>>An Action that takes the MqttClientConfigurationBuilder and configures it.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Produce<TMessage>(Action<MqttProducerEndpointConfigurationBuilder<TMessage>>)
Adds a producer endpoint, which is a topic and its related configuration (serializer, etc.).
public MqttClientConfigurationBuilder Produce<TMessage>(Action<MqttProducerEndpointConfigurationBuilder<TMessage>> configurationBuilderAction) where TMessage : class
Parameters
configurationBuilderActionAction<MqttProducerEndpointConfigurationBuilder<TMessage>>An Action that takes the MqttClientConfigurationBuilder and configures it.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Type Parameters
TMessageThe type (or base type) of the messages being produced. This is used to setup the serializer and will determine the type of the message parameter in the nested configuration functions.
Produce<TMessage>(string?, Action<MqttProducerEndpointConfigurationBuilder<TMessage>>)
Adds a producer endpoint, which is a topic and its related configuration (serializer, etc.).
public MqttClientConfigurationBuilder Produce<TMessage>(string? name, Action<MqttProducerEndpointConfigurationBuilder<TMessage>> configurationBuilderAction) where TMessage : class
Parameters
namestringThe name is used to guarantee that a duplicated configuration is discarded and is also displayed in the logs. By default the name will be generated concatenating the topic name and the message type.
configurationBuilderActionAction<MqttProducerEndpointConfigurationBuilder<TMessage>>An Action that takes the MqttClientConfigurationBuilder and configures it.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Type Parameters
TMessageThe type (or base type) of the messages being produced. This is used to setup the serializer and will determine the type of the message parameter in the nested configuration functions.
RequestCleanSession()
Specifies that a clean non-persistent session has to be created for this client. This is the default, use RequestPersistentSession(TimeSpan) to switch to a persistent session.
public MqttClientConfigurationBuilder RequestCleanSession()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Remarks
Clean session in MQTT versions below 5.0 is the same as clean start in MQTT 5.0. RequestCleanSession() and RequestCleanStart() are the same.
RequestCleanStart()
Specifies that a clean non-persistent session has to be created for this client. This is the default, use RequestPersistentSession(TimeSpan) to switch to a persistent session.
public MqttClientConfigurationBuilder RequestCleanStart()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Remarks
Clean session in MQTT versions below 5.0 is the same as clean start in MQTT 5.0. RequestCleanSession() and RequestCleanStart() are the same.
RequestPersistentSession(TimeSpan)
Specifies that a persistent session has to be created for this client.
public MqttClientConfigurationBuilder RequestPersistentSession(TimeSpan sessionExpiryInterval = default)
Parameters
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
RequestProblemInformation()
Specifies that the reason string or user properties can be sent with any packet. This is usually the default.
public MqttClientConfigurationBuilder RequestProblemInformation()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
RequestResponseInformation()
Specifies that the server should return the response information in the CONNACK packet.
public MqttClientConfigurationBuilder RequestResponseInformation()
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
SendKeepAlive(TimeSpan)
Sets the maximum period that can elapse without a packet being sent to the message broker. When this period is elapsed a ping packet will be sent to keep the connection alive. The default is 15 seconds.
public MqttClientConfigurationBuilder SendKeepAlive(TimeSpan interval)
Parameters
intervalTimeSpanThe maximum period that can elapse without a packet being sent.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
SendLastWillMessage<TLwtMessage>(Action<MqttLastWillMessageConfigurationBuilder<TLwtMessage>>)
Specifies the last will and testament (LWT) message to be sent when the client disconnects ungracefully.
public MqttClientConfigurationBuilder SendLastWillMessage<TLwtMessage>(Action<MqttLastWillMessageConfigurationBuilder<TLwtMessage>> lastWillBuilderAction)
Parameters
lastWillBuilderActionAction<MqttLastWillMessageConfigurationBuilder<TLwtMessage>>An Action<T> that takes the MqttLastWillMessageConfigurationBuilder<TMessage> and configures it.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Type Parameters
TLwtMessageThe LWT message type.
UseEnhancedAuthenticationHandler(IMqttEnhancedAuthenticationHandler)
Sets the handler to be used to handle the authentication.
public MqttClientConfigurationBuilder UseEnhancedAuthenticationHandler(IMqttEnhancedAuthenticationHandler handler)
Parameters
handlerIMqttEnhancedAuthenticationHandlerThe MQTTnet.IMqttEnhancedAuthenticationHandler instance to be used.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
UseEnhancedAuthenticationHandler(Type)
Sets the handler to be used to handle the authentication.
public MqttClientConfigurationBuilder UseEnhancedAuthenticationHandler(Type handlerType)
Parameters
handlerTypeTypeThe type of the MQTTnet.IMqttEnhancedAuthenticationHandler to be used. The instance will be resolved via the IServiceProvider.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
UseEnhancedAuthenticationHandler<THandler>()
Sets the handler to be used to handle the authentication.
public MqttClientConfigurationBuilder UseEnhancedAuthenticationHandler<THandler>() where THandler : IMqttEnhancedAuthenticationHandler
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
Type Parameters
THandlerThe type of the MQTTnet.IMqttEnhancedAuthenticationHandler to be used. The instance will be resolved via the IServiceProvider.
UseProtocolVersion(MqttProtocolVersion)
Specifies the MQTT protocol version. The default is MQTTnet.Formatter.MqttProtocolVersion.V500.
public MqttClientConfigurationBuilder UseProtocolVersion(MqttProtocolVersion value)
Parameters
valueMqttProtocolVersionThe MQTTnet.Formatter.MqttProtocolVersion.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
WithAcknowledgmentTimeout(TimeSpan)
Sets the maximum time to wait for the acknowledgment operation to complete. The default is 30 seconds.
public MqttClientConfigurationBuilder WithAcknowledgmentTimeout(TimeSpan timeout)
Parameters
timeoutTimeSpanThe maximum time to wait for the acknowledgment operation to complete.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
WithClientId(string)
Sets the client identifier. The default is Guid.NewGuid().ToString().
public MqttClientConfigurationBuilder WithClientId(string value)
Parameters
valuestringThe client identifier.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
WithCredentials(IMqttClientCredentialsProvider)
Sets the credential to be used to authenticate with the message broker.
public MqttClientConfigurationBuilder WithCredentials(IMqttClientCredentialsProvider credentialsProvider)
Parameters
credentialsProviderIMqttClientCredentialsProviderThe MQTTnet.IMqttClientCredentialsProvider.
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
WithCredentials(string, byte[]?)
Sets the credential to be used to authenticate with the message broker.
public MqttClientConfigurationBuilder WithCredentials(string username, byte[]? password = null)
Parameters
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
WithCredentials(string, string?)
Sets the credential to be used to authenticate with the message broker.
public MqttClientConfigurationBuilder WithCredentials(string username, string? password = null)
Parameters
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
WithEnhancedAuthentication(string?, byte[]?)
Specifies the authentication method to be used and the associated data.
public MqttClientConfigurationBuilder WithEnhancedAuthentication(string? method, byte[]? data)
Parameters
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
WithSessionExpiration(TimeSpan)
Sets the session expiry interval. When set to 0 the session will expire when the connection is closed, while MaxValue indicates that the session will never expire. The default is 0.
public MqttClientConfigurationBuilder WithSessionExpiration(TimeSpan sessionExpiryInterval)
Parameters
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.
WithTimeout(TimeSpan)
Sets the timeout which will be applied at socket level and internal operations. The default value is the same as for sockets in .NET in general.
public MqttClientConfigurationBuilder WithTimeout(TimeSpan value)
Parameters
Returns
- MqttClientConfigurationBuilder
The MqttClientConfigurationBuilder so that additional calls can be chained.