Class ServiceCollectionUseMockedKafkaExtensions
Adds the UseMockedKafka
method to the Microsoft.Extensions.DependencyInjection.IServiceCollection.
Inheritance
System.Object
ServiceCollectionUseMockedKafkaExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Silverback.Integration.Kafka.Testing.dll
Syntax
public static class ServiceCollectionUseMockedKafkaExtensions
Methods
| Improve this doc View sourceUseMockedKafka(IServiceCollection, Action<IMockedKafkaOptionsBuilder>)
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 IServiceCollection UseMockedKafka(this IServiceCollection services, Action<IMockedKafkaOptionsBuilder> optionsAction = null)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection | services | The Microsoft.Extensions.DependencyInjection.IServiceCollection to add the service to. |
System.Action<IMockedKafkaOptionsBuilder> | optionsAction | Additional options (such as topics and partitions settings). |
Returns
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection | The Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained. |