简体   繁体   English

MSMQ上的专用和公用队列

[英]Private and public queues on MSMQ

服务器A是否可以从服务器B访问专用队列?

There is little functional difference between a public and private queue, except that MSMQ publishes information about public queues in Active Directory (AD). 公用队列和专用队列之间几乎没有功能上的区别,除了MSMQ在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. 专用队列是未在Active Directory中发布的队列,仅在包含它们的本地计算机上显示。 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. 消息队列通过将队列的描述存储在本地计算机上的LQS(本地队列存储)目录中,在本地注册专用队列。 In MSMQ 2.0, and Message Queuing 3.0, the default location is %windir%\\system32\\msmq\\storage\\lqs. 在MSMQ 2.0和消息队列3.0中,默认位置为%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. 请注意,在本地计算机上创建的每个公共队列的描述也本地存储在LQS文件夹中的单独文件中。

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. 路径名:ComputerName \\ private $ \\ QueueName。

Path name on local computer: \\private$\\QueueName. 本地计算机上的路径名:\\ private $ \\ QueueName。

Direct format name:: DIRECT=ComputerAddress\\PRIVATE$\\PrivateQueueName. 直接格式名称:: DIRECT = ComputerAddress \\ PRIVATE $ \\ PrivateQueueName。

Private format name: PRIVATE=ComputerGUID\\QueueNumber. 专用格式名称: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 . 参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM