System.Messaging Namespace (original) (raw)

Skip to main contentSkip to in-page navigation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

System.Messaging Namespace

Provides classes that allow you to connect to, monitor, and administer message queues on the network and send, receive, or peek messages.

Classes

AccessControlEntry Specifies access rights for a trustee (user, group, or computer) to perform application-specific implementations of common tasks.
AccessControlList Contains a list of access control entries, specifying access rights for one or more trustees.
ActiveXMessageFormatter Serializes or deserializes primitive data types and other objects to or from the body of a Message Queuing message, using a format that is compatible with the MSMQ ActiveX Component.
BinaryMessageFormatter Serializes or deserializes an object, or an entire graph of connected objects, to or from the body of a Message Queuing message, using a binary format.
Cursor A Cursor is used to maintain a specific location in a MessageQueue when reading the queue's messages.
DefaultPropertiesToSend Specifies the default property values that will be used when sending objects other than Message instances to a message queue.
Message Provides access to the properties needed to define a Message Queuing message.
MessageEnumerator Provides a forward-only cursor to enumerate through messages in a message queue.
MessagePropertyFilter Controls and selects the properties that are retrieved when peeking or receiving messages from a message queue.
MessageQueue Provides access to a queue on a Message Queuing server.
MessageQueueAccessControlEntry Specifies access rights for a trustee (user, group, or computer) to perform Message Queuing tasks.
MessageQueueCriteria Filters message queues when performing a query using the MessageQueue class's GetPublicQueues() method.
MessageQueueEnumerator Provides a forward-only cursor to enumerate through messages in a message queue.
MessageQueueException The exception that is thrown if a Microsoft Message Queuing internal error occurs.
MessageQueueInstaller Allows you to install and configure a queue that your application needs in order to run. This class is called by the installation utility, for example, InstallUtil.exe, when installing a MessageQueue.
MessageQueuePermission Allows control of code access permissions for messaging.
MessageQueuePermissionAttribute Allows declarative MessageQueue permission checks.
MessageQueuePermissionEntry Defines the smallest unit of a code access security permission set for messaging.
MessageQueuePermissionEntryCollection Contains a strongly typed collection of MessageQueuePermissionEntry objects.
MessageQueueTransaction Provides a Message Queuing internal transaction.
MessagingDescriptionAttribute Specifies a description for a property or event.
PeekCompletedEventArgs Provides data for the PeekCompleted event. When your asynchronous peek operation calls an event handler, an instance of this class is passed to the handler.
ReceiveCompletedEventArgs Provides data for the ReceiveCompleted event. When your asynchronous receive operation calls an event handler, an instance of this class is passed to the handler.
SecurityContext Represents the security context for a message in a queue.
Trustee Specifies a user account, group account, or logon session to which an access control entry applies.
XmlMessageFormatter Serializes and deserializes objects to or from the body of a message, using the XML format based on the XSD schema definition.

Interfaces

IMessageFormatter Serializes or deserializes objects from the body of a Message Queuing message.

Enums

AccessControlEntryType Specifies whether to allow, deny, or revoke access rights for a trustee.
AcknowledgeTypes Specifies the types of acknowledgment message that Message Queuing returns to the sending application.
Acknowledgment Specifies the result of an attempted message delivery.
CryptographicProviderType Specifies the cryptographic service providers available for validating digital signatures.
EncryptionAlgorithm Specifies the encryption algorithm used to encrypt the message body of a private message.
EncryptionRequired Specifies the privacy level of messages received by the queue.
GenericAccessRights Uses the Windows 2000 and Windows NT access format to specify a set of common access rights that Message Queuing maps to both standard and object-specific access rights for reading, writing, and executing.
HashAlgorithm Specifies the hash algorithm used by Message Queuing when authenticating messages.
MessageLookupAction Specifies a message to peek at or receive from a message queue.
MessagePriority Specifies the priority Message Queuing applies to a message while it is en route to a queue, and when inserting the message into the destination queue.
MessageQueueAccessRights Specifies a set of object-specific access rights for operations specific to Message Queuing.
MessageQueueErrorCode Identifies the source of an error that occurred within the Message Queuing application and generated a MessageQueueException exception.
MessageQueuePermissionAccess Defines access levels used by System.Messaging permission classes.
MessageQueueTransactionStatus Specifies the state of an internal Message Queuing transaction.
MessageQueueTransactionType Specifies the type of a Message Queuing transaction.
MessageType Identifies the type of a message. A message can be a typical Message Queuing message, a positive (arrival and read) or negative (arrival and read) acknowledgment message, or a report message.
PeekAction Indicates whether to peek the current message in a queue, or the next message.
QueueAccessMode Specifies the access mode for a MessageQueue at creation time.
StandardAccessRights Specifies a set of standard access rights that correspond to operations common to most types of securable objects.
TrusteeType Specifies the type of a trustee.

Delegates

Remarks

Members of the MessageQueue class include the following methods for reading and writing messages to the queue:

The following methods of the MessageQueue class provide functionality for retrieving lists of queues by specified criteria and determining if specific queues exist:

Other methods of the MessageQueue class provide the following functionality:

The Message class provides detailed control over the information you send to a queue, and is the object used when receiving or peeking messages from a queue. Besides the message body, the properties of the Message class include acknowledgment settings, formatter selection, identification, authentication and encryption information, timestamps, indications about using tracing, server journaling, and dead-letter queues, and transaction data.

The MessageQueue component is associated with the following three formatters, which enable you to serialize and deserialize messages sent and received from queues:

Other classes in the Messaging namespace support code-access and ACL-based security, filtering Message properties when reading messages from a queue, and using transactions when sending and receiving messages.

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.

Additional resources

In this article