C# Class Westwind.MessageQueueing.QueueMessageManagerSqlMsMq

An implementation of a combination of SQL Server and MSMQ to handle two messaging via random acccess to messages so they can be retrived for long running tasks where both client and server can interact with each message for processing. This implementation uses SQL server for the actual data storage and MSMQ to handle the message de-queuing by storing IDs in MSMQ. MSMQ allows much greater throughput for dequeuing message ids when polled frequently. Great for long running tasks or even light workflow scenarios.
Inheritance: QueueMessageManagerSql, IDisposable
Exibir arquivo Open project: RickStrahl/Westwind.QueueMessageManager Class Usage Examples

Public Methods

Method Description
GetNextQueueMessage ( string queueName = null ) : QueueMessageItem

Retrieves the next pending Message from the Queue based on a provided queueName

GetQueue ( string queueName = null ) : System.Messaging.MessageQueue

Creates an MSMQ Queue

InsertIdIntoQueue ( QueueMessageItem item = null ) : bool

Helper method that inserts the

QueueMessageManagerSqlMsMq ( ) : System
QueueMessageManagerSqlMsMq ( string connectionString ) : System
QueueMessageManagerSqlMsMq ( string connectionString, string queuePath ) : System
ResubmitMessage ( QueueMessageItem item = null ) : bool

Resubmit message into the queue as a cleared and message to be reprocessed. All date flags are cleared. This method immediately writes the queue item to disk immediately. This version also writes an MSMQ item for the ID.

Save ( QueueMessageItem item = null ) : bool

Saves the passed message item or the attached item to the database and creates a MSMQ message for the ID to be picked up. Call this after updating properties or individual values. Inserts or updates based on whether the ID exists

Method Details

GetNextQueueMessage() public method

Retrieves the next pending Message from the Queue based on a provided queueName
public GetNextQueueMessage ( string queueName = null ) : QueueMessageItem
queueName string
return QueueMessageItem

GetQueue() public method

Creates an MSMQ Queue
public GetQueue ( string queueName = null ) : System.Messaging.MessageQueue
queueName string
return System.Messaging.MessageQueue

InsertIdIntoQueue() public method

Helper method that inserts the
public InsertIdIntoQueue ( QueueMessageItem item = null ) : bool
item QueueMessageItem
return bool

QueueMessageManagerSqlMsMq() public method

public QueueMessageManagerSqlMsMq ( ) : System
return System

QueueMessageManagerSqlMsMq() public method

public QueueMessageManagerSqlMsMq ( string connectionString ) : System
connectionString string
return System

QueueMessageManagerSqlMsMq() public method

public QueueMessageManagerSqlMsMq ( string connectionString, string queuePath ) : System
connectionString string
queuePath string
return System

ResubmitMessage() public method

Resubmit message into the queue as a cleared and message to be reprocessed. All date flags are cleared. This method immediately writes the queue item to disk immediately. This version also writes an MSMQ item for the ID.
public ResubmitMessage ( QueueMessageItem item = null ) : bool
item QueueMessageItem
return bool

Save() public method

Saves the passed message item or the attached item to the database and creates a MSMQ message for the ID to be picked up. Call this after updating properties or individual values. Inserts or updates based on whether the ID exists
public Save ( QueueMessageItem item = null ) : bool
item QueueMessageItem
return bool