Skip to content

DoublePrecisionSoftware/AnyQ.Queues.Msmq

Repository files navigation

AnyQ.Queues.Msmq

MSMQ Extensions for AnyQ

Build status Coverity status NuGet version

Summary

AnyQ.Queues.Msmq provides concrete classes for extending the AnyQ library with support for MSMQ via the System.Messaging namespace.

Usage

For most use cases, it should be sufficient to create an instance of the MsmqJobQueueFactory class to pass to a JobQueueListener. The MsmqJobQueueFactory class has two required dependencies: an IPayloadFormatter, and an IRequestSerializer. The optional dependency, a System.Messaging.AccessControlList, is used when creating or accessing a queue. See the Microsoft Docs page for more info.

Example

var jobQueueFactory = 
    new AnyQ.Queues.Msmq.MsmqJobQueueFactory(new JsonPayloadFormatter(), new JsonRequestSerializer());
var listener = new JobQueueListener(jobQueueFactory);

For more control, you may implement your own JobHandler using the MsmqMessageFactory and MsmqMessageQueueFactory classes.