Interface IBrokerCollection
Holds a reference to all the registered IBroker implementations and is able to resolve the right instance according to the IEndpoint type.
Inherited Members
Namespace: Silverback.Messaging.Broker
Assembly: Silverback.Integration.dll
Syntax
public interface IBrokerCollection : IReadOnlyList<IBroker>, IReadOnlyCollection<IBroker>, IEnumerable<IBroker>, IEnumerable
Methods
| Improve this doc View sourceAddConsumer(IConsumerEndpoint)
Adds an IConsumer that will consume from the specified endpoint as soon as the broker is connected. The received messages will be forwarded to the specified callback delegate.
Declaration
IConsumer AddConsumer(IConsumerEndpoint endpoint)
Parameters
| Type | Name | Description |
|---|---|---|
| IConsumerEndpoint | endpoint | The source endpoint. |
Returns
| Type | Description |
|---|---|
| IConsumer | The IConsumer for the specified endpoint. |
ConnectAsync()
Connect to all message brokers to start consuming.
Declaration
Task ConnectAsync()
Returns
| Type | Description |
|---|---|
| Task | A Task representing the asynchronous operation. |
DisconnectAsync()
Disconnect from all message brokers to stop consuming.
Declaration
Task DisconnectAsync()
Returns
| Type | Description |
|---|---|
| Task | A Task representing the asynchronous operation. |
GetProducer(IProducerEndpoint)
Returns an IProducer to be used to produce to the specified endpoint.
Declaration
IProducer GetProducer(IProducerEndpoint endpoint)
Parameters
| Type | Name | Description |
|---|---|---|
| IProducerEndpoint | endpoint | The target endpoint. |
Returns
| Type | Description |
|---|---|
| IProducer | The IProducer for the specified endpoint. |