Skip to content

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 by System.Messaging.
  • QueueReader.Peek replaces MessageQueue.Peek method.
  • QueueReader.Read replaces MessageQueue.Receive method.
  • QueueWriter.Write replaces MessageQueue.Send method.
  • QueueReader.Lookup method replaces ReceiveByLookupId and additionally supports lookup of first, last, previous and next messages.
  • Direct support for Tasks and async/await via PeekAsync() and ReadAsync() methods.
  • Methods that accept a timeout, e.g. Peek...() and Read...() methods, return null if the timeout was reached rather than throwing an exception.
  • You can only open queues using format names. Use Queue.TryCreate() or Queue.PathToFormatName() to get a format name from a queue path.
  • Message properties for AdministrationQueue, DestinationQueue and ResponseQueue are format names, not type MessageQueue.
  • Message Id and CorrelationId properties have a type of struct MessageId, not string.
  • Body has a type of byte[], and is either a byte array, ACSII or UTF-16 string
  • All the Read.. and Peek... methods accept a Properties parameter (default is All), which replaces the Message.MessageReadFilter.
  • The QueueTransaction class automatically starts a transaction when it is created, and replaces MessageQueueTransaction class.
  • QueueTransaction.None, QueueTransaction.Single or QueueTransaction.Dtc static fields replace MessageQueueTransactionType enum.
  • Additional message properties are supported, e.g. TransactionFirst, TransactionLast, TransactionAbortCount, TransactionMoveCount.
Clone this wiki locally