-
Notifications
You must be signed in to change notification settings - Fork 1
Differences from System.Messaging
busterwood edited this page Jan 3, 2018
·
1 revision
- BusterWood.Msmq only fully supports private queues at the moment, some public queue message properties are missing
- Format names are pure MSMQ format names, they do not accept the
FormatName:
prefix required bySystem.Messaging
. -
QueueReader.Peek
replacesMessageQueue.Peek
method. -
QueueReader.Read
replacesMessageQueue.Receive
method. -
QueueWriter.Write
replacesMessageQueue.Send
method. -
QueueReader.Lookup
method replacesReceiveByLookupId
and additionally supports lookup of first, last, previous and next messages. - Direct support for Tasks and
async/await
viaPeekAsync()
andReadAsync()
methods. - Methods that accept a timeout, e.g.
Peek...()
andRead...()
methods, returnnull
if the timeout was reached rather than throwing an exception. - You can only open queues using format names. Use
Queue.TryCreate()
orQueue.PathToFormatName()
to get a format name from a queue path. - Message properties for
AdministrationQueue
,DestinationQueue
andResponseQueue
are format names, not typeMessageQueue
. - Message
Id
andCorrelationId
properties have a type ofstruct MessageId
, not string. -
Body
has a type ofbyte[]
, and is either a byte array, ACSII or UTF-16 string - All the
Read..
andPeek...
methods accept aProperties
parameter (default isAll
), which replaces theMessage.MessageReadFilter
. - The
QueueTransaction
class automatically starts a transaction when it is created, and replacesMessageQueueTransaction
class. -
QueueTransaction.None
,QueueTransaction.Single
orQueueTransaction.Dtc
static fields replaceMessageQueueTransactionType
enum. - Additional message properties are supported, e.g.
TransactionFirst
,TransactionLast
,TransactionAbortCount
,TransactionMoveCount
.