Class NatsBuilder
- Namespace
- NATS.Extensions.Microsoft.DependencyInjection
- Assembly
- NATS.Extensions.Microsoft.DependencyInjection.dll
Fluent builder for configuring the NATS client registered by AddNatsClient.
public class NatsBuilder
- Inheritance
-
NatsBuilder
- Inherited Members
Constructors
- NatsBuilder(IServiceCollection)
Initializes a new instance of the NatsBuilder class.
Methods
- ConfigureConnection(Action<NatsConnection>)
Registers a callback invoked on each connection after it is created.
- ConfigureConnection(Action<IServiceProvider, NatsConnection>)
Registers a callback invoked on each connection after it is created, with access to the service provider.
- ConfigureOptions(Action<OptionsBuilder<NatsOptsBuilder>>)
Configures the underlying NatsOptsBuilder options.
- WithPoolSize(Func<IServiceProvider, int>)
Sets the connection pool size using a factory resolved from the service provider.
- WithPoolSize(int)
Sets the connection pool size.
- WithSerializerRegistry(INatsSerializerRegistry)
Override the default INatsSerializerRegistry for the options.
- WithSubPendingChannelFullMode(BoundedChannelFullMode)
Override the default BoundedChannelFullMode for the pending messages channel.