Microsoft Message Queue (MSMQ) is a service that allows queues to be created on a computer, and for applications to write and read messages to and from the queues. Applications can access queues that are located on other computers. In the case of writing to a queue, an application can write messages to a queue located on another computer, and if the other computer is not connected, the messages are queued on the local computer. Once the computers are again connected, MSMQ automatically transfers the messages. Messages can only be read from queues on connected computers. Any application, subject to permissions and security, can read or write messages from or to a queue. This means that a queue can be used for two-way data transmission. A queue can service requests from applications running on different computers, as each message has a sender identifier. Messages in a queue can store data in different formats. It is up to the application to interpret the format of the data. Messages have several important data items associated with them, including the following:
MSMQ provides several features that are essential in a disconnected environment:
MSMQ uses TCP/IP sockets to provide communications and is available on Windows CE, NT, 98, and 2000. Queues use names based on Domain Name Service (DNS) names rather than IP addresses. This allows for dynamic allocation of TCP/IP addresses. As with most services, Windows CE provides a limited but useful subset of functionality found on the desktop. There are two types of queues public and private. Public queues are given a computer-independent name (that is, not based on a DNS or IP address). The location of the queue is resolved using Active Directory when the queue is accessed. Private queues use the DNS name of the computer and do not require Active Directory for resolution. This is faster, but means that applications need to know the physical location of a queue. Only private queues are supported in Windows CE.
|