Private Messages

MSMQ provides a secured channel for sending private, encrypted messages throughout your MSMQ enterprise. MSMQ ensures that the body of private messages are kept encrypted from the moment they leave the source Queue Manager to the moment they reach their target Queue Manager.

Note Private messages can also be sent to foreign queues via an MSMQ connector server. For information on sending private message to foreign queues, see Passing Private Messages.

With encryption and decryption provided by MSMQ Queue Managers, applications do not have to encrypt messages when they are sent or decrypt messages when they are received. When a private message is sent, the source Queue Manager encrypts the body of the message, then sends the message on to the target Queue Manager. When the target Queue Manager receives the message, it decodes the body of the message and passes the clear message on to the queue. The receiving application can then read the message from the queue without ever knowing it was encrypted.

Note Even though the receiving application sees the message as clear text, it can look at the message's privacy level to determine whether the message was sent encrypted, or look at the encryption algorithm used when the message was sent.

To send a private message, the sending application sets the privacy level of the message and the encryption algorithm. The default encryption algorithm is RC2 (message encryption is based on public-key encryption using the Microsoft® Cryptographic API with an underlying RSA provider).

Note In addition to setting the privacy level of a message, the privacy level of a queue can also be set so that the queue only accepts private messages.

For a complete example of sending a private message (including setting the privacy level of a queue) see:

For a description of the properties used to set the privacy level of a message, see:


© 1997 by Microsoft Corporation. All rights reserved.