msmq - MSMQ 上的私有(private)和公共(public)队列

标签 msmq

服务器 A 是否可以从服务器 B 访问私有(private)队列?

最佳答案

公共(public)队列和私有(private)队列之间几乎没有功能差异,除了 MSMQ 在 Active Directory (AD) 中发布有关公共(public)队列的信息。

我自己从来没有这样做过,但是如果您知道私有(private)队列的完整路径,您可以从另一台服务器访问它:

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 .

关于msmq - MSMQ 上的私有(private)和公共(public)队列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3394940/

相关文章:

c# - 如何防止 WCF 服务进入故障状态?

msmq - 如何修复 MassTransit 的错误

powershell - 使用 PowerShell cmdlet 设置 MSMQ ACL 时遇到问题

c# - MSMQ,消息被放入队列并消失但从未被服务契约(Contract)接收

.net - 如何在 nservicebus MSMQ 中达到最大重试次数时发送电子邮件

visual-studio - 如何获取 msi(VS 安装项目)来安装 Windows 组件?

php - 使用 PHP 打开 MSMQ 队列

c# - 在我手动点击服务之前,IIS7 中托管的 WCF MSMQ 不会自动检索消息

c# - 编写 MSMQ 示例应用程序所需的最低限度

MSMQ是一个不错的选择?