Can MSMQ/T send messages to public queues?


Well, one more non-architectural thing, but people are asking...

The short answer is, YES. And here is the detailed answer from Iuliu Rus, the member of the product team and our expert in MSMQ/T:

Public queue is a queue that can be programmatically discovered from Active Directory. Private queue is not in the directory, you don’t know if it exists, unless another person tells you.

You can send messages to any queue in two ways. One involves routing and one direct. For both private and public queues, the addressing can be either direct or public/private (which means routing). You can send messages to a public queue with the DIRECT format (this is the recommended way). To address a public queue with the direct format, use DIRECT=OS:computername\queue. To address a private queue with the direct format, use DIRECT=OS:computername\private$\queue.

To address a public queue with the PUBLIC format (routing involved) use PUBLIC=<active directory queue guid>. To address a private queue using the PRIVATE format, use PRIVATE = <active directory computer guid>\private queue number.

Usually people use the PUBLIC or PRIVATE formats when talking to an MQSeries queue over the mqseries bridge. There is little reason (except mqseries) to use a PUBLIC or PRIVATE format name, and it usually revolves around queues being in different sites or cases where you want to control the traffic so it always passes through the same MSMQ router machine.

Biztalk supports sending with the PUBLIC and PRIVATE formats in active directory mode.

 

Skip to main content