C# Class paramore.brighter.commandprocessor.messaginggateway.rmq.MessageGateway

Class RMQMessageGateway. Base class for messaging gateway used by a InputChannel to communicate with a RabbitMQ server, to consume messages from the server or CommandProcessor.Post{T} to send a message to the RabbitMQ server. A channel is associated with a queue name, which binds to a MessageHeader.Topic when CommandProcessor.Post{T} sends over a task queue. So to listen for messages on that Topic you need to bind to the matching queue name. The configuration holds a <serviceActivatorConnections> section which in turn contains a <connections> collection that contains a set of connections. Each connection identifies a mapping between a queue name and a IRequest derived type. At runtime we read this list and listen on the associated channels. The MessagePump then uses the IAmAMessageMapper associated with the configured request type in IAmAMessageMapperRegistry to translate between the on-the-wire message and the Command or Event
Inheritance: IDisposable
Mostra file Open project: iancooper/Paramore

Protected Properties

Property Type Description
Channel IModel
Connection paramore.brighter.commandprocessor.messaginggateway.rmq.MessagingGatewayConfiguration.RmqMessagingGatewayConnection

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Protected Methods

Method Description
ConnectToBroker ( ) : void
Dispose ( bool disposing ) : void
EnsureChannel ( string queueName = "Producer Channel" ) : void

Connects the specified queue name.

MessageGateway ( RmqMessagingGatewayConnection connection ) : System

Initializes a new instance of the MessageGateway class. Use if you need to inject a test logger The amqp uri and exchange to connect to

Private Methods

Method Description
ConnectWithCircuitBreaker ( string queueName ) : void
ConnectWithRetry ( string queueName ) : void

Method Details

ConnectToBroker() protected method

protected ConnectToBroker ( ) : void
return void

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EnsureChannel() protected method

Connects the specified queue name.
protected EnsureChannel ( string queueName = "Producer Channel" ) : void
queueName string Name of the queue.
return void

MessageGateway() protected method

Initializes a new instance of the MessageGateway class. Use if you need to inject a test logger The amqp uri and exchange to connect to
protected MessageGateway ( RmqMessagingGatewayConnection connection ) : System
connection paramore.brighter.commandprocessor.messaginggateway.rmq.MessagingGatewayConfiguration.RmqMessagingGatewayConnection
return System

Property Details

Channel protected_oe property

The channel
protected IModel Channel
return IModel

Connection protected_oe property

The configuration
protected RmqMessagingGatewayConnection,paramore.brighter.commandprocessor.messaginggateway.rmq.MessagingGatewayConfiguration Connection
return paramore.brighter.commandprocessor.messaginggateway.rmq.MessagingGatewayConfiguration.RmqMessagingGatewayConnection