Class BrokerOptionsBuilderAddMockedMqttExtensions
Adds the AddMockedMqtt
method to the IBrokerOptionsBuilder.
Inherited Members
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Silverback.Integration.MQTT.Testing.dll
Syntax
public static class BrokerOptionsBuilderAddMockedMqttExtensions
Methods
| Improve this doc View sourceAddMockedMqtt(IBrokerOptionsBuilder, Action<IMockedMqttOptionsBuilder>?)
Registers Apache Mqtt as message broker but replaces the MQTT connectivity based on MQTTnet with a mocked in-memory message broker that more or less replicates the MQTT broker behavior.
Declaration
public static IBrokerOptionsBuilder AddMockedMqtt(this IBrokerOptionsBuilder brokerOptionsBuilder, Action<IMockedMqttOptionsBuilder>? optionsAction = null)
Parameters
Type | Name | Description |
---|---|---|
IBrokerOptionsBuilder | brokerOptionsBuilder | The IBrokerOptionsBuilder that references the IServiceCollection to add the services to. |
Action<IMockedMqttOptionsBuilder> | optionsAction | Configures the mock options. |
Returns
Type | Description |
---|---|
IBrokerOptionsBuilder | The IBrokerOptionsBuilder so that additional calls can be chained. |