星期二, 九月 04, 2007

MSMQ Addressing

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by Nicholas Allen on Aug 28, 2007

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


 
 

Things you can do from here:

 
 

没有评论:

发表评论