C# Класс 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.
Наследование: QueueMessageManagerSql, IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

GetNextQueueMessage() публичный Метод

Retrieves the next pending Message from the Queue based on a provided queueName
public GetNextQueueMessage ( string queueName = null ) : QueueMessageItem
queueName string
Результат QueueMessageItem

GetQueue() публичный Метод

Creates an MSMQ Queue
public GetQueue ( string queueName = null ) : System.Messaging.MessageQueue
queueName string
Результат System.Messaging.MessageQueue

InsertIdIntoQueue() публичный Метод

Helper method that inserts the
public InsertIdIntoQueue ( QueueMessageItem item = null ) : bool
item QueueMessageItem
Результат bool

QueueMessageManagerSqlMsMq() публичный Метод

public QueueMessageManagerSqlMsMq ( ) : System
Результат System

QueueMessageManagerSqlMsMq() публичный Метод

public QueueMessageManagerSqlMsMq ( string connectionString ) : System
connectionString string
Результат System

QueueMessageManagerSqlMsMq() публичный Метод

public QueueMessageManagerSqlMsMq ( string connectionString, string queuePath ) : System
connectionString string
queuePath string
Результат System

ResubmitMessage() публичный Метод

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
Результат bool

Save() публичный Метод

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
Результат bool