Class BrokerClientsInitializer
- Namespace
- Silverback.Messaging.Configuration
- Assembly
- Silverback.Integration.dll
Initializes the broker clients, producers and consumers.
public abstract class BrokerClientsInitializer : IBrokerClientsInitializer
- Inheritance
-
BrokerClientsInitializer
- Implements
- Inherited Members
Constructors
BrokerClientsInitializer(IServiceProvider, ISilverbackLogger<IBrokerClientsInitializer>)
Initializes a new instance of the BrokerClientsInitializer class.
protected BrokerClientsInitializer(IServiceProvider serviceProvider, ISilverbackLogger<IBrokerClientsInitializer> logger)
Parameters
serviceProviderIServiceProviderThe IServiceProvider to be used to resolve the necessary services.
loggerISilverbackLogger<IBrokerClientsInitializer>
Properties
ServiceProvider
Gets the root IServiceProvider.
protected IServiceProvider ServiceProvider { get; }
Property Value
Methods
AddClient(IBrokerClient)
Registers the IBrokerClient.
protected void AddClient(IBrokerClient client)
Parameters
clientIBrokerClientThe IBrokerClient to be added.
AddConsumer(IConsumer)
Registers the IConsumer.
protected void AddConsumer(IConsumer consumer)
Parameters
AddProducer(IProducer, bool)
Registers the IProducer.
protected void AddProducer(IProducer producer, bool routing = true)
Parameters
producerIProducerThe IProducer to be added.
routingboolA 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.
public void Initialize()
InitializeCore()
Initializes the broker clients, producers and consumers.
protected abstract void InitializeCore()