WCF MsmqBinding WAS:侦听器尝试将每个队列与服务匹配
我正在使用带有 netMsmqBinding 和 WAS 的 WCF 服务。一切似乎都运行良好(包括远程发布到队列,感谢 stackoverflow 社区:))。
现在剩下的问题是,服务处理了一些消息,然后停止,并在事件日志中显示一条消息,例如“服务‘~/registrator’不存在。”。看来我有一个具有该名称的队列,与我的服务无关。如果我删除该队列,另一个队列会出现另一条相同类型的消息,等等...所以看来 msmqListener 服务尝试从所有队列中读取并为每个队列匹配一个服务端点?
那么问题是:如何告诉 netMsmqListener 服务仅侦听某些队列,或者至少在找不到其中某些队列的端点时不会失败?
I'm using a WCF Service with netMsmqBinding and WAS. Everything seems to work well (including remote posting to the queue thanks to stackoverflow community:)).
The remaining problem now is that the service processes a few messages then stops with a message in the event log like "The service '~/registrator' does not exist.". It appears that I have a queue with that name that has nothing to do with my service. If I remove that queue, another message of the same type appears for another queue, etc... So it seems that the msmqListener service try to read from all queues and match a service endpoint for each of them ?
The question would then be : how to tell netMsmqListener service to only listen for some queues or at least not failing when an endpoint can't be found for some of those ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,net.msmq 侦听器适配器服务不可直接配置。 Microsoft Connect 这似乎与您遇到的问题类似。 Microsoft 支持人员无法重现该问题,但尚未关闭该报告。在这种情况下,问题可能出在 SERVICE1 的 MSMQ 队列名称上。该要求似乎使用以下命名约定:ServiceName/service.svc 作为队列名称。
有几个解决方法:首先尝试检查“~/registrator”队列的权限,然后删除运行 net.msmq 侦听器适配器服务的帐户(如果已列出)。否则(更彻底),将使用“~/registrator”队列的应用程序移动到另一台服务器,并仅将 WCF 服务队列保留在当前计算机上。
As far as I can tell, the net.msmq listener adapter service is not configurable directly. There is a report in the Microsoft Connect that seems to be a similar issue to the one you are having. Microsoft support wasn't able to replicate the issue but hasn't closed the report. In that case, the problem may have been the MSMQ queue name for SERVICE1. The requirement seems to be using this naming convention: ServiceName/service.svc for the queue name.
A couple of workarounds: first try checking the permissions for the '~/registrator' queue and remove the account the net.msmq listener adapter service is running under if it is listed. Otherwise (and more drastically), move the application that uses the '~/registrator' queue to another server and just leave WCF service queues on the current machine.