Freigeben über


HTTP/HTTPS messages

Applies To: Windows Server 2008

HTTP/HTTPS messages

Message Queuing includes support for delivering messages over HTTP, in addition to the Message Queuing protocol. Messages can be sent over HTTP transport to destination queues on an intranet within an enterprise or over the Internet, and the sender and recipient can be in different forests or organizations. For Message Queuing to send messages over HTTP, you must enable the Message Queuing HTTP Support feature. This feature installs Internet Information Services (IIS) and creates an IIS extension for Message Queuing. For more information, see Choosing Installation Features. This feature is not enabled during a default Message Queuing installation.

Message Queuing formats messages using the XML-based SOAP Reliable Messaging Protocol (SRMP), an open general-purpose extension of the SOAP Message Exchange Protocol (SMXP). SRMP defines an open implementation-independent protocol for the reliable one-way delivery of SOAP 1.1 messages. For more information, see SRMP Messages. Using SRMP, applications can also be written to create messages that are indistinguishable from Message Queuing-generated HTTP messages on computers that do not have HTTP Support installed, such as computers running MSMQ 1.0 or MSMQ 2.0. These messages can be sent as HTTP packets and accepted by queues hosted on computers with HTTP Support enabled. They can then be received as HTTP messages by applications running on those computers.

To send messages to a destination queue over HTTP, the target computer must have Message Queuing's HTTP Support feature enabled and IIS installed. Access to the queue can be restricted to specific users by changing the permissions of the virtual directory in the IIS Administration console.

For secure HTTP messaging, HTTPS provides authentication and a Secure Sockets Layer (SSL) connection between a sender and recipient. For more information, see HTTPS Authentication.

HTTP message formats

Destination queues for HTTP messages are opened using direct format names that include the URL address of the target computer, the virtual directory name, and the queue name separated by slashes. The default virtual directory name is msmq, but Message Queuing can be configured by IIS to use a different virtual directory. The format names used to send messages over the Internet must include the IP address or complete DNS name of the target computer, while the computer name is sufficient for sending messages within the enterprise. Examples of these direct format names include:

  • DIRECT=https://157.18.3.1/msmq/MyQueue (Single computer or cluster)

  • DIRECT=https://Mike01/msmq/MyQueue (Within the enterprise)

  • DIRECT=https://mail.www.northwindtraders.com/msmq/MyQueue (Over the Internet)

  • DIRECT=HTTPS://mail.www.northwindtraders.com/msmq/MyQueue (Over the Internet)

  • DIRECT=https://193.2.34.5/msmq/MyQueue (Over the Internet)

The public, private, and direct format names of administration or response queues can be included in messages sent over HTTP. Conversely, the names of administration or response queues in HTTP format can be included in messages sent over an ordinary (non-HTTP) transport. However, the use of distribution lists and multiple-element format names for these purposes is not supported.

For information about direct format names, see "Direct format names" in Queue Names.

Pipelining

Sending a new request before finishing reading all the responses from previous requests is called pipelining. Because proxies do not always support pipelining and because IIS HTTPS currently does not support it, HTTPS pipelining is disabled by default. To modify default pipelining behavior, create the DWORD registry entries, HttpPipeLine and HttpsPipeline, under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters registry key. When these entries are set to 1, pipelining is enabled for the respective protocol. By default, HTTP delivery works in pipeline mode, while HTTPS delivery does not. After setting the registry, restart the Message Queuing service for the changes to take effect.

Warning

Incorrectly editing the registry may severely damage your system. It is recommended that you back up any valuable data on the computer before making changes to the registry.