Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Private and public queues on MSMQ

Tags:

msmq

Is it possible for server A to access a private queue from server B?

like image 519
Lieven Cardoen Avatar asked Aug 03 '10 08:08

Lieven Cardoen


People also ask

What is private queues in MSMQ?

Private queues are queues that are not published in Active Directory and are displayed only on the local computer that contains them.

How do I create a private queue in MSMQ?

To create a new queue, right click on the desired queue folder (Public Queues or Private Queues) and select New > Public/Private Queue. In the New Public/Private Queue dialog, enter the name of the queue in the Queue name text field. Click OK to confirm.

What are the different types of message queue?

The system has different types of message queues: workstation message queue, user profile message queue, job message queue, system operator message queue, and history log message queue.

What is a public queue?

Public Queues (MachineName\QueueName) are destination queues published in Active Directory. This means that the queue's properties (not contents) are replicated. Private Queues (MachineName\Private$\QueueName) are destination queues that are registered on the local machine.


1 Answers

There is little functional difference between a public and private queue, except that MSMQ publishes information about public queues in Active Directory (AD).

I've never done this myself, but it appears that if you know the full path to the private queue, you can access it from another server:

Private queues

Private queues are queues that are not published in Active Directory and are displayed only on the local computer that contains them. Private queues have the following features:

Message Queuing registers private queues locally by storing a description of the queue in the LQS (local queue storage) directory on the local computer. In MSMQ 2.0, and Message Queuing 3.0, the default location is %windir%\system32\msmq\storage\lqs. Note that a description of each public queue created on the local computer is also stored locally in a separate file in the LQS folder.

Private queues are registered on the local computer, not in the directory service, and typically cannot be located by other Message Queuing applications.

Private queues are accessible only by Message Queuing applications that know the full path name, the direct format name, or the private format name of the queue, as follows:

Path name:ComputerName\private$\QueueName.

Path name on local computer: \private$\QueueName.

Direct format name:: DIRECT=ComputerAddress\PRIVATE$\PrivateQueueName.

Private format name: PRIVATE=ComputerGUID\QueueNumber.

For more information on path names and format names, see Queue names.

Private queues have the advantage of no directory service overhead, making them quicker to create, no latency in accessing them, and no replication overhead.

Private queues are not dependent on the directory service, and thus can be created and deleted when the directory service is not working. This is useful for offline operation.

One way that private queues can be exposed to other applications is by setting a message property. To distribute the location of a private queue, an application can send a format name of the private queue as the response queue property of a message.

Ref.

like image 118
Mitch Wheat Avatar answered Oct 11 '22 10:10

Mitch Wheat