Interface IMqttConsumerEndpointBuilder
Builds the MqttConsumerEndpoint.
Inherited Members
Namespace: Silverback.Messaging.Configuration.Mqtt
Assembly: Silverback.Integration.MQTT.dll
Syntax
public interface IMqttConsumerEndpointBuilder : IConsumerEndpointBuilder<IMqttConsumerEndpointBuilder>, IEndpointBuilder<IMqttConsumerEndpointBuilder>
Methods
| Improve this doc View sourceConfigure(Action<IMqttClientConfigBuilder>)
Configures the MQTT client properties.
Declaration
IMqttConsumerEndpointBuilder Configure(Action<IMqttClientConfigBuilder> configBuilderAction)
Parameters
Type | Name | Description |
---|---|---|
Action<IMqttClientConfigBuilder> | configBuilderAction | An Action<T> that takes the IMqttClientConfigBuilder and configures it. |
Returns
Type | Description |
---|---|
IMqttConsumerEndpointBuilder | The IMqttConsumerEndpointBuilder so that additional calls can be chained. |
Configure(Action<MqttClientConfig>)
Configures the MQTT client properties.
Declaration
IMqttConsumerEndpointBuilder Configure(Action<MqttClientConfig> configAction)
Parameters
Type | Name | Description |
---|---|---|
Action<MqttClientConfig> | configAction | An Action<T> that takes the MqttClientConfig and configures it. |
Returns
Type | Description |
---|---|
IMqttConsumerEndpointBuilder | The IMqttConsumerEndpointBuilder so that additional calls can be chained. |
ConsumeFrom(params string[])
Specifies the name of the topics or the topic filter strings.
Declaration
IMqttConsumerEndpointBuilder ConsumeFrom(params string[] topics)
Parameters
Type | Name | Description |
---|---|---|
string[] | topics | The name of the topics or the topic filter string. |
Returns
Type | Description |
---|---|
IMqttConsumerEndpointBuilder | The IMqttConsumerEndpointBuilder so that additional calls can be chained. |
DisableParallelProcessing()
Disables parallel messages processing, setting the max degree of parallelism to 1 (default).
Declaration
IMqttConsumerEndpointBuilder DisableParallelProcessing()
Returns
Type | Description |
---|---|
IMqttConsumerEndpointBuilder | The IMqttConsumerEndpointBuilder so that additional calls can be chained. |
EnableParallelProcessing(int)
Enables parallel processing and sets the maximum number of incoming message that can be processed concurrently.
Declaration
IMqttConsumerEndpointBuilder EnableParallelProcessing(int maxDegreeOfParallelism)
Parameters
Type | Name | Description |
---|---|---|
int | maxDegreeOfParallelism | The maximum number of incoming message that can be processed concurrently. |
Returns
Type | Description |
---|---|
IMqttConsumerEndpointBuilder | The IMqttConsumerEndpointBuilder 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 default limit is 1.
Declaration
IMqttConsumerEndpointBuilder LimitBackpressure(int backpressureLimit)
Parameters
Type | Name | Description |
---|---|---|
int | backpressureLimit | The maximum number of messages to be enqueued. |
Returns
Type | Description |
---|---|
IMqttConsumerEndpointBuilder | The IMqttConsumerEndpointBuilder so that additional calls can be chained. |
WithAtLeastOnceQoS()
Specifies that the topics have to be subscribed with the at least once quality of service level.
Declaration
IMqttConsumerEndpointBuilder WithAtLeastOnceQoS()
Returns
Type | Description |
---|---|
IMqttConsumerEndpointBuilder | The IMqttConsumerEndpointBuilder so that additional calls can be chained. |
WithAtMostOnceQoS()
Specifies that the topics have to be subscribed with the at most once quality of service level.
Declaration
IMqttConsumerEndpointBuilder WithAtMostOnceQoS()
Returns
Type | Description |
---|---|
IMqttConsumerEndpointBuilder | The IMqttConsumerEndpointBuilder so that additional calls can be chained. |
WithExactlyOnceQoS()
Specifies that the topics have to be subscribed with the exactly once quality of service level.
Declaration
IMqttConsumerEndpointBuilder WithExactlyOnceQoS()
Returns
Type | Description |
---|---|
IMqttConsumerEndpointBuilder | The IMqttConsumerEndpointBuilder so that additional calls can be chained. |
WithQualityOfServiceLevel(MqttQualityOfServiceLevel)
Specifies the desired quality of service level.
Declaration
IMqttConsumerEndpointBuilder WithQualityOfServiceLevel(MqttQualityOfServiceLevel qosLevel)
Parameters
Type | Name | Description |
---|---|---|
MqttQualityOfServiceLevel | qosLevel | The MQTTnet.Protocol.MqttQualityOfServiceLevel. |
Returns
Type | Description |
---|---|
IMqttConsumerEndpointBuilder | The IMqttConsumerEndpointBuilder so that additional calls can be chained. |