Class RabbitBroker
An IBroker implementation for RabbitMQ.
Inherited Members
Namespace: Silverback.Messaging.Broker
Assembly: Silverback.Integration.RabbitMQ.dll
Syntax
public class RabbitBroker : Broker<RabbitProducerEndpoint, RabbitConsumerEndpoint>, IBroker, IDisposable
Constructors
| Improve this doc View sourceRabbitBroker(IServiceProvider)
Initializes a new instance of the RabbitBroker class.
Declaration
public RabbitBroker(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider | The IServiceProvider to be used to resolve the required services. |
Methods
| Improve this doc View sourceInstantiateConsumer(RabbitConsumerEndpoint, IBrokerBehaviorsProvider<IConsumerBehavior>, IServiceProvider)
Returns a new instance of IConsumer to subscribe to the specified endpoint.
Declaration
protected override IConsumer InstantiateConsumer(RabbitConsumerEndpoint endpoint, IBrokerBehaviorsProvider<IConsumerBehavior> behaviorsProvider, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
RabbitConsumerEndpoint | endpoint | The endpoint. |
IBrokerBehaviorsProvider<IConsumerBehavior> | behaviorsProvider | |
IServiceProvider | serviceProvider | The IServiceProvider instance to be used to resolve the needed types or to be forwarded to the consumer. |
Returns
Type | Description |
---|---|
IConsumer | The instantiated IConsumer. |
Overrides
| Improve this doc View sourceInstantiateProducer(RabbitProducerEndpoint, IBrokerBehaviorsProvider<IProducerBehavior>, IServiceProvider)
Returns a new instance of IProducer to publish to the specified endpoint. The returned instance will be cached and reused for the same endpoint.
Declaration
protected override IProducer InstantiateProducer(RabbitProducerEndpoint endpoint, IBrokerBehaviorsProvider<IProducerBehavior> behaviorsProvider, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
RabbitProducerEndpoint | endpoint | The endpoint. |
IBrokerBehaviorsProvider<IProducerBehavior> | behaviorsProvider | |
IServiceProvider | serviceProvider | The IServiceProvider instance to be used to resolve the needed types or to be forwarded to the consumer. |
Returns
Type | Description |
---|---|
IProducer | The instantiated IProducer. |