Table of Contents

Class MqttConsumerEndpointConfigurationBuilder<TMessage>

Namespace
Silverback.Messaging.Configuration.Mqtt
Assembly
Silverback.Integration.MQTT.dll
public class MqttConsumerEndpointConfigurationBuilder<TMessage> : ConsumerEndpointConfigurationBuilder<TMessage, MqttConsumerEndpointConfiguration, MqttConsumerEndpointConfigurationBuilder<TMessage>>

Type Parameters

TMessage

The type of the messages being consumed.

Inheritance
MqttConsumerEndpointConfigurationBuilder<TMessage>
Inherited Members

Constructors

MqttConsumerEndpointConfigurationBuilder(IServiceProvider, string?)

Initializes a new instance of the MqttConsumerEndpointConfigurationBuilder<TMessage> class.

public MqttConsumerEndpointConfigurationBuilder(IServiceProvider serviceProvider, string? friendlyName = null)

Parameters

serviceProvider IServiceProvider

The IServiceProvider.

friendlyName string

An optional friendly to be shown in the human-targeted output (e.g. logs, health checks result, etc.).

Properties

This

Gets this instance.

protected override MqttConsumerEndpointConfigurationBuilder<TMessage> This { get; }

Property Value

MqttConsumerEndpointConfigurationBuilder<TMessage>

Remarks

This is necessary to work around casting in the base classes.

Methods

ConsumeFrom(params string[])

Specifies the name of the topics or the topic filter strings.

public MqttConsumerEndpointConfigurationBuilder<TMessage> ConsumeFrom(params string[] topics)

Parameters

topics string[]

The name of the topics or the topic filter string.

Returns

MqttConsumerEndpointConfigurationBuilder<TMessage>

The MqttConsumerEndpointConfigurationBuilder<TMessage> so that additional calls can be chained.

CreateConfiguration()

Creates the TConfiguration instance.

protected override MqttConsumerEndpointConfiguration CreateConfiguration()

Returns

MqttConsumerEndpointConfiguration

The endpoint.

WithAtLeastOnceQoS()

Specifies that the topics have to be subscribed with the at least once quality of service level.

public MqttConsumerEndpointConfigurationBuilder<TMessage> WithAtLeastOnceQoS()

Returns

MqttConsumerEndpointConfigurationBuilder<TMessage>

The MqttConsumerEndpointConfigurationBuilder<TMessage> 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.

public MqttConsumerEndpointConfigurationBuilder<TMessage> WithAtMostOnceQoS()

Returns

MqttConsumerEndpointConfigurationBuilder<TMessage>

The MqttConsumerEndpointConfigurationBuilder<TMessage> so that additional calls can be chained.

WithExactlyOnceQoS()

Specifies that the topics have to be subscribed with the exactly once quality of service level.

public MqttConsumerEndpointConfigurationBuilder<TMessage> WithExactlyOnceQoS()

Returns

MqttConsumerEndpointConfigurationBuilder<TMessage>

The MqttConsumerEndpointConfigurationBuilder<TMessage> so that additional calls can be chained.

WithQualityOfServiceLevel(MqttQualityOfServiceLevel)

Specifies the desired quality of service level.

public MqttConsumerEndpointConfigurationBuilder<TMessage> WithQualityOfServiceLevel(MqttQualityOfServiceLevel qosLevel)

Parameters

qosLevel MqttQualityOfServiceLevel

The MQTTnet.Protocol.MqttQualityOfServiceLevel.

Returns

MqttConsumerEndpointConfigurationBuilder<TMessage>

The MqttConsumerEndpointConfigurationBuilder<TMessage> so that additional calls can be chained.