NatsBuilderExtensions

Extension methods to register NATS queue services.

Namespace:
KpokPatagon.Queue.Nats.DependencyInjection
Type:
Class
Public:
Yes
Protected:
No
Sealed:
Yes
Abstract:
Yes

Methods

AddKpokNatsConsumerServices

Adds a IConsumerServices implemented by NatsConsumerServices using the specified configurationKey to add the service required QueueConnectionOptions.

Signature:
public IServiceCollection AddKpokNatsConsumerServices(services, configuration, configurationKey, lifetime)
Parameters
Name Type Summary
services IServiceCollection The service collection.
configuration IConfiguration The configuration for the application.
configurationKey String The key of the queue configuration section.
lifetime ServiceLifetime The service lifetime.

AddKpokNatsPublisherServices

Adds a IPublisherServices implemented by NatsPublisherServices using the specified configurationKey to add the service required QueueConnectionOptions.

Signature:
public IServiceCollection AddKpokNatsPublisherServices(services, configuration, configurationKey, lifetime)
Parameters
Name Type Summary
services IServiceCollection The service collection.
configuration IConfiguration The configuration for the application.
configurationKey String The key of the queue configuration section.
lifetime ServiceLifetime The service lifetime.

AddKpokNatsQueueServices

Adds a IQueueServices implemented by NatsQueueServices using the specified configurationKey to add the service required QueueConnectionOptions.

Signature:
public IServiceCollection AddKpokNatsQueueServices(services, configuration, configurationKey, lifetime)
Parameters
Name Type Summary
services IServiceCollection The service collection.
configuration IConfiguration The configuration for the application.
configurationKey String The key of the queue configuration section.
lifetime ServiceLifetime The service lifetime.