Table of Contents

Class BrokerOptionsBuilderKafkaTestingExtensions

Namespace
Silverback.Messaging.Configuration
Assembly
Silverback.Integration.Kafka.Testing.dll

Adds the AddMockedKafka method to the BrokerOptionsBuilder.

public static class BrokerOptionsBuilderKafkaTestingExtensions
Inheritance
BrokerOptionsBuilderKafkaTestingExtensions
Inherited Members

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.

public static BrokerOptionsBuilder AddMockedConfluentSchemaRegistry(this BrokerOptionsBuilder brokerOptionsBuilder)

Parameters

brokerOptionsBuilder BrokerOptionsBuilder

The BrokerOptionsBuilder that references the IServiceCollection to add the services to.

Returns

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.

public static BrokerOptionsBuilder AddMockedKafka(this BrokerOptionsBuilder brokerOptionsBuilder, Action<IMockedKafkaOptionsBuilder>? optionsAction = null)

Parameters

brokerOptionsBuilder BrokerOptionsBuilder

The BrokerOptionsBuilder that references the IServiceCollection to add the services to.

optionsAction Action<IMockedKafkaOptionsBuilder>

Configures the mock options.

Returns

BrokerOptionsBuilder

The BrokerOptionsBuilder so that additional calls can be chained.