Welcome to MSDN Blogs Sign in | Join | Help

MSMQ Addressing

Here's a quick guide to how an address that uses the net.msmq scheme in WCF gets turned into an actual MSMQ address. There are three transfer protocols used with MSMQ: native, SRMP (SOAP Reliable Messaging Protocol), and SRMPS (SOAP Reliable Messaging Protocol Secure). Each of the transfer protocols translates addresses slightly differently.

For a given net.msmq address, we'll first check the transfer protocol. If the transfer protocol is SRMP or SRMPS, then the MSMQ address is going to be a direct address. The only difference between SRMP and SRMPS is that SRMP uses the http scheme while SRMPS uses the https scheme. The MSMQ address produced from net.msmq://hostname:port/queuename is DIRECT=http://hostname:port/msmq/queuename. Having a port is optional, and this part of the address is omitted if no port is specified. A private queue name is written as private/queuename in net.msmq but translates to private$/queuename in the MSMQ address. It's illegal to include the dollar sign in a net.msmq address.

If the transfer protocol is native, then the MSMQ address is either going to be a GUID address or a direct address. A GUID address is created if the binding has been configured with UseActiveDirectory set to true. The GUID uniquely identifies the queue. Otherwise, the MSMQ address produced from net.msmq://hostname/queuename is DIRECT=OS:hostname\queuename. Unlike SRMP, a port is never specified with the native transfer protocol. Again, a private queue name is written as private/queuename in net.msmq but translates to private$\queuename in the MSMQ address. Finally, if the hostname is an IP address, then the resulting MSMQ address instead is DIRECT=TCP:hostname\queuename.

Next time: Attribute Driven Transactions

Published Tuesday, August 28, 2007 5:00 AM by Nicholas Allen
Filed under: , ,

Comments

Tuesday, August 28, 2007 2:20 PM by Nicholas Allen's Indigo Blog

# Endpoints with Multiple Schemes

My service has two endpoints, an HTTP endpoint for serving metadata and a non-HTTP endpoint for the actual

Tuesday, August 28, 2007 7:04 PM by Udi Dahan

# re: MSMQ Addressing

Aren't there any cases where you use the "FormatName" prefix? As I understand it, it has some impact on sending messages when disconnected.

Tuesday, August 28, 2007 7:35 PM by Nicholas Allen

# re: MSMQ Addressing

Hi Udi,

The MSMQ integration binding uses format name addresses but the net.msmq scheme does not as far as I can think of.

New Comments to this post are disabled
 
Page view tracker