Table of Contents

Method WithPoolSize

Namespace
NATS.Extensions.Microsoft.DependencyInjection
Assembly
NATS.Extensions.Microsoft.DependencyInjection.dll

WithPoolSize(int)

Sets the connection pool size.

public NatsBuilder WithPoolSize(int size)

Parameters

size int

Number of connections in the pool. Values below 1 are treated as 1.

Returns

NatsBuilder

Builder to allow method chaining.

WithPoolSize(Func<IServiceProvider, int>)

Sets the connection pool size using a factory resolved from the service provider.

public NatsBuilder WithPoolSize(Func<IServiceProvider, int> sizeConfigurer)

Parameters

sizeConfigurer Func<IServiceProvider, int>

Callback returning the pool size. Values below 1 are treated as 1.

Returns

NatsBuilder

Builder to allow method chaining.