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