Class BrokerClientsInitializer
Initializes the broker clients, producers and consumers.
Implements
Inherited Members
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Integration.dll
Syntax
public abstract class BrokerClientsInitializer : IBrokerClientsInitializer
Constructors
BrokerClientsInitializer(IServiceProvider, ISilverbackLogger<IBrokerClientsInitializer>)
Initializes a new instance of the BrokerClientsInitializer class.
Declaration
protected BrokerClientsInitializer(IServiceProvider serviceProvider, ISilverbackLogger<IBrokerClientsInitializer> logger)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceProvider | serviceProvider | The IServiceProvider to be used to resolve the necessary services. |
| ISilverbackLogger<IBrokerClientsInitializer> | logger |
Properties
ServiceProvider
Gets the root IServiceProvider.
Declaration
protected IServiceProvider ServiceProvider { get; }
Property Value
| Type | Description |
|---|---|
| IServiceProvider |
Methods
AddClient(IBrokerClient)
Registers the IBrokerClient.
Declaration
protected void AddClient(IBrokerClient client)
Parameters
| Type | Name | Description |
|---|---|---|
| IBrokerClient | client | The IBrokerClient to be added. |
AddConsumer(IConsumer)
Registers the IConsumer.
Declaration
protected void AddConsumer(IConsumer consumer)
Parameters
| Type | Name | Description |
|---|---|---|
| IConsumer | consumer | The IConsumer to be added. |
AddProducer(IProducer, bool)
Registers the IProducer.
Declaration
protected void AddProducer(IProducer producer, bool routing = true)
Parameters
| Type | Name | Description |
|---|---|---|
| IProducer | producer | The IProducer to be added. |
| bool | routing | A value indicating whether the producer endpoints must implicitly be added to the mapped outbound routes (according to the message type). |
Initialize()
Initializes the broker clients, producers and consumers.
Declaration
public void Initialize()
InitializeCore()
Initializes the broker clients, producers and consumers.
Declaration
protected abstract void InitializeCore()