Class BrokerOptionsBuilderKafkaTestingExtensions
Adds the AddMockedKafka method to the BrokerOptionsBuilder.
Inherited Members
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Integration.Kafka.Testing.dll
Syntax
public static class BrokerOptionsBuilderKafkaTestingExtensions
Methods
AddMockedConfluentSchemaRegistry(BrokerOptionsBuilder)
Registers the Confluent schema registry but replaces the schema registry connectivity with a mocked in-memory schema registry that more or less replicates the Confluent schema registry behavior.
Declaration
public static BrokerOptionsBuilder AddMockedConfluentSchemaRegistry(this BrokerOptionsBuilder brokerOptionsBuilder)
Parameters
| Type | Name | Description |
|---|---|---|
| BrokerOptionsBuilder | brokerOptionsBuilder | The BrokerOptionsBuilder that references the IServiceCollection to add the services to. |
Returns
| Type | Description |
|---|---|
| BrokerOptionsBuilder | The BrokerOptionsBuilder so that additional calls can be chained. |
AddMockedKafka(BrokerOptionsBuilder, 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 BrokerOptionsBuilder AddMockedKafka(this BrokerOptionsBuilder brokerOptionsBuilder, Action<IMockedKafkaOptionsBuilder>? optionsAction = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BrokerOptionsBuilder | brokerOptionsBuilder | The BrokerOptionsBuilder that references the IServiceCollection to add the services to. |
| Action<IMockedKafkaOptionsBuilder> | optionsAction | Configures the mock options. |
Returns
| Type | Description |
|---|---|
| BrokerOptionsBuilder | The BrokerOptionsBuilder so that additional calls can be chained. |