Class RabbitMQProviderServiceCollectionExtensions
- Namespace
- Steeltoe.CloudFoundry.Connector.RabbitMQ
- Assembly
- Steeltoe.CloudFoundry.ConnectorCore.dll
public static class RabbitMQProviderServiceCollectionExtensions
- Inheritance
-
RabbitMQProviderServiceCollectionExtensions
- Inherited Members
Methods
AddRabbitMQConnection(IServiceCollection, IConfiguration, ServiceLifetime, ILoggerFactory, bool)
Add RabbitMQ and its IHealthContributor to a ServiceCollection
public static IServiceCollection AddRabbitMQConnection(this IServiceCollection services, IConfiguration config, ServiceLifetime contextLifetime = ServiceLifetime.Singleton, ILoggerFactory logFactory = null, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
contextLifetimeServiceLifetimeLifetime of the service to inject
logFactoryILoggerFactorylogger factory
addSteeltoeHealthChecksboolAdd Steeltoe healthChecks
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
RabbitMQ.Client.ConnectionFactory is retrievable as both ConnectionFactory and IConnectionFactory
AddRabbitMQConnection(IServiceCollection, IConfiguration, string, ServiceLifetime, ILoggerFactory, bool)
Add RabbitMQ and its IHealthContributor to a ServiceCollection
public static IServiceCollection AddRabbitMQConnection(this IServiceCollection services, IConfiguration config, string serviceName, ServiceLifetime contextLifetime = ServiceLifetime.Singleton, ILoggerFactory logFactory = null, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
serviceNamestringcloud foundry service name binding
contextLifetimeServiceLifetimeLifetime of the service to inject
logFactoryILoggerFactorylogger factory
addSteeltoeHealthChecksboolAdd Steeltoe healthChecks
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
RabbitMQ.Client.ConnectionFactory is retrievable as both ConnectionFactory and IConnectionFactory