Class RabbitConnectionFactory
The factory that creates and stores the connections to Rabbit in order to create a single connection per each RabbitConnectionConfig.
Implements
Inherited Members
Namespace: Silverback.Messaging.Broker.Rabbit
Assembly: Silverback.Integration.RabbitMQ.dll
Syntax
public sealed class RabbitConnectionFactory : IDisposable
Methods
| Improve this doc View sourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
GetChannel(RabbitConsumerEndpoint)
Returns a channel to consume from the specified endpoint.
Declaration
public (IModel Channel, string QueueName) GetChannel(RabbitConsumerEndpoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
RabbitConsumerEndpoint | endpoint | The endpoint to be consumed from. |
Returns
Type | Description |
---|---|
(IModel Channel, string QueueName) | The RabbitMQ.Client.IModel representing the channel. |
GetChannel(RabbitProducerEndpoint, string)
Returns a channel to produce to the specified endpoint.
Declaration
public IModel GetChannel(RabbitProducerEndpoint endpoint, string actualEndpointName)
Parameters
Type | Name | Description |
---|---|---|
RabbitProducerEndpoint | endpoint | The endpoint to be produced to. |
string | actualEndpointName | The actual target endpoint name. |
Returns
Type | Description |
---|---|
IModel | The RabbitMQ.Client.IModel representing the channel. |