C# Class DotNetWorkQueue.Transport.PostgreSQL.Basic.PostgreSqlMessageQueueReceive

Handles receive of messages, and passing them back to the caller
Inheritance: IReceiveMessages
Mostra file Open project: blehnen/DotNetWorkQueue

Public Methods

Method Description
PostgreSqlMessageQueueReceive ( QueueConsumerConfiguration configuration, IConnectionFactory connectionFactory, IQueueCancelWork cancelWork, HandleMessage handleMessage, ReceiveMessage receiveMessages, SqlHeaders sqlHeaders ) : System

Initializes a new instance of the PostgreSqlMessageQueueReceive class.

ReceiveMessage ( IMessageContext context ) : IReceivedMessageInternal

Returns a message to process.

ReceiveMessageAsync ( IMessageContext context ) : Task

Returns a message to process.

Private Methods

Method Description
ContextCleanup ( IMessageContext context, Connection connection ) : void

Clean up the message context when processing is done

ContextOnCommit ( object sender, EventArgs eventArgs ) : void

On Commit

ContextOnCommitTransaction ( object sender, EventArgs eventArgs ) : void

Commit a message

ContextOnRollback ( object sender, EventArgs eventArgs ) : void

On Rollback

ContextOnRollbackTransaction ( object sender, EventArgs eventArgs ) : void

Roll back a message

GetConnectionAndSetOnContext ( IMessageContext context ) : Connection

Creates the connection object for the parent caller and stores it on the worker context.

context_Cleanup ( object sender, EventArgs e ) : void

Handles the Cleanup event of the context control.

Method Details

PostgreSqlMessageQueueReceive() public method

Initializes a new instance of the PostgreSqlMessageQueueReceive class.
public PostgreSqlMessageQueueReceive ( QueueConsumerConfiguration configuration, IConnectionFactory connectionFactory, IQueueCancelWork cancelWork, HandleMessage handleMessage, ReceiveMessage receiveMessages, SqlHeaders sqlHeaders ) : System
configuration DotNetWorkQueue.Configuration.QueueConsumerConfiguration The configuration.
connectionFactory IConnectionFactory The connection factory.
cancelWork IQueueCancelWork The cancel work.
handleMessage DotNetWorkQueue.Transport.PostgreSQL.Basic.Message.HandleMessage The handle message.
receiveMessages DotNetWorkQueue.Transport.PostgreSQL.Basic.Message.ReceiveMessage The receive messages.
sqlHeaders SqlHeaders The SQL headers.
return System

ReceiveMessage() public method

Returns a message to process.
An error occurred while attempting to read messages from the queue
public ReceiveMessage ( IMessageContext context ) : IReceivedMessageInternal
context IMessageContext The context.
return IReceivedMessageInternal

ReceiveMessageAsync() public method

Returns a message to process.
An error occurred while attempting to read messages from the queue
public ReceiveMessageAsync ( IMessageContext context ) : Task
context IMessageContext The message context.
return Task