Table of Contents

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

serviceProvider IServiceProvider

The IServiceProvider to be used to resolve the necessary services.

logger ISilverbackLogger<IBrokerClientsInitializer>

The ISilverbackLogger<TCategoryName>.

Properties

ServiceProvider

Gets the root IServiceProvider.

protected IServiceProvider ServiceProvider { get; }

Property Value

IServiceProvider

Methods

AddClient(IBrokerClient)

Registers the IBrokerClient.

protected void AddClient(IBrokerClient client)

Parameters

client IBrokerClient

The IBrokerClient to be added.

AddConsumer(IConsumer)

Registers the IConsumer.

protected void AddConsumer(IConsumer consumer)

Parameters

consumer IConsumer

The IConsumer to be added.

AddProducer(IProducer, bool)

Registers the IProducer.

protected void AddProducer(IProducer producer, bool routing = true)

Parameters

producer IProducer

The IProducer to be added.

routing bool

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.

public void Initialize()

InitializeCore()

Initializes the broker clients, producers and consumers.

protected abstract void InitializeCore()