写入远程 MSMQ
好的,这是一个非常简单且基本的问题。 如果我在 Windows 计算机 A 上有一个应用程序想要写入 Windows 计算机 B 上的队列,我是否需要在计算机 A 上安装 MSMQ(即使那里没有队列)?我刚刚开始在我的应用程序中使用队列,并试图弄清楚一些基本原理。
谢谢
Okay, here is a very simple and fundamental question.
If I have an application on windows machine A that wants to write to a queue on windows machine B, do I need to have MSMQ installed on machine A (even though there is no queue there)? I am just beginning to use queues for my applications and trying to figure some fundamentals out.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
是的,您需要在本地安装 MSMQ 才能写入远程队列。如果您要写入专用队列,请查看此页面 其中包含有关如何格式化队列名称的有用信息。如果您正在写入远程事务队列,那么您需要确保正确指定(第 5 点)
这是文章文本:
Yes, you need MSMQ installed locally to write to a remote queue. If you're writing to a private queue, take a look at this page which has useful information on how to format the queue name. If you're writing to a remote Transactional queue, then you need to make sure you specify that correctly (point 5)
This is the article text:
所有 MSMQ 通信的每一端都需要一个 MSMQ 队列管理器。
使用 MSMQ 的应用程序与其本地队列管理器进行通信,后者为它们完成工作。
使用 MSMQ 的应用程序无法直接与任何本地或远程队列通信。
All MSMQ communication requires an MSMQ queue manager at each end.
MSMQ-using applications communicate with their local queue manager which does the work for them.
MSMQ-using applications cannot communicate directly with any queues, local or remote.
另一种方法(而不是在运行客户端的本地计算机上安装 MSMQ)是实现从 MSMQ 队列获取消息的 WCF 服务。在这种情况下,您的远程客户端只需指定远程服务端点即可直接写入远程队列。您还必须小心远程队列的安全设置是否正确。
我认为这将是实现基于队列的通信的更好方法。这是一个简短的答案,但如果您感兴趣,我会很乐意扩展(我注意到您对其他答案非常满意:)
Another (instead of installing MSMQ on the local machine running the client) would be to implement a WCF service which takes its messages from an MSMQ queue. In that case, your remote client would only have to specify the remote service endpoint for it to write directly to the remote queue. You would also have to be careful that the security on the remote queue was set correctly.
I think this would be a better way of implementing queue-based communication. This is a short answer, but I will happily expand if you're interested (I noticed that you were pretty happy with the other answer :)
以下格式对我们有用
此外,您还需要授予远程队列访问权限
安全性:允许匿名登录
below format worked for us
Also you would require to give remote queue access permissions
security: Allow Anonymus login