MSMQ in the .NET Compact Framework

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The .NET Compact Framework supports Message Queuing (also known as MSMQ) in Windows Embedded CE. MSMQ makes it possible for applications to communicate with other applications across networks and systems that might be temporarily offline.

To use this service, applications send messages to a message queue. A message queue can hold messages for both the sending and receiving applications that are either on the same device or on different devices.

When a network connection is established, MSMQ delivers messages into the remote queue regardless of whether a receiving application is running. The receiving application can check for messages in its local queue at any time.

MSMQ is not built into the Windows Embedded CE operating system on a Pocket PC, but you can install it, start the service, and create applications that use it. The following describes how to get the MSMQ component:

  • The Windows Mobile 2003 for Pocket PC SDK provides MSMQ for Pocket PCs running Windows Mobile 2003 for Pocket PC.

  • Devices running Windows Mobile version 5.0 software for Pocket PCs or Smartphones can download the MSMQ component from the Redistributable Server Components for Windows Mobile 5.0.

  • MSMQ is not available for Windows Mobile 2003 for Smartphone.

  • MSMQ is available to Windows Embedded CE device developers who are using Microsoft Platform Builder.

Windows Mobile 2003 for Pocket PC does not support the HTTP-based SOAP Reliable Messaging Protocol (SRMP), so you must use a proprietary MSMQ protocol for sending messages. SRMP is supported by Windows Mobile version 5.0.

The .NET Compact Framework supports only the XmlMessageFormatter for serializing and deserializing messages to and from the message queue.

The .NET Compact Framework does not support the following features, because they are not available in Windows Embedded CE:

  • Multiple message transactions. Transaction support is limited to single message transactions.

  • Remote queue read.

  • Encryption.

  • Security based on an access control list (ACL).

  • MQMail.

  • Public queues based on Active Directory.

Because Active Directory is not supported on devices, the .NET Compact Framework cannot determine if a remote queue is transactional. To send a message to a remote transaction queue, the following is required:

  1. Add ;XACTONLY to the queue path in MessageQueue constructors that take a string path parameter, and add it to the Path property.

  2. Specify Single for MessageQueueTransactionType in Send methods that take that parameter.

The .NET Compact Framework does not support the following types in the System.Messaging namespace:

AccessControlEntry

AccessControlEntryType

AccessControlList

ActiveXMessageFormatter

BinaryMessageFormatter

CryptographicProviderType

Cursor

EncryptionAlgorithm

EncryptionRequired

GenericAccessRights

HashAlgorithm

MessageLookupAction

MessageQueueAccessControlEntry

MessageQueueAccessRights

MessageQueueCriteria

MessageQueueEnumerator

MessageQueueInstaller

MessageQueuePermission

MessageQueuePermissionAttribute

MessageQueuePermissionEntry

MessageQueuePermissionEntryCollection

MessageQueueTransaction

MessageQueueTransactionStatus

MessagingDescriptionAttribute

PeekAction

QueueAccessMode

StandardAccessRights

Trustee

TrusteeType

See Also

Tasks

How to: Use MSMQ in the .NET Compact Framework

MSMQ Book Order Application Sample

Concepts

Message Queues and Messaging Technology Backgrounder