【发布时间】:2015-06-21 15:08:08
【问题描述】:
我正在尝试设置 WCF 服务来处理有毒队列消息,但我正在努力做到这一点。我有一个 WCF 服务配置为:
<endpoint address="net.msmq://serverip/private/services/eventservice.svc;poison"
binding="netMsmqBinding"
bindingConfiguration="MsmqBindingTransactionalSecurityPoisonHandling"
contract="App.IEventService" />
我的绑定配置是:
<binding name="MsmqBindingTransactionalSecurityPoisonHandling" exactlyOnce="true" durable="true">
<security mode="None" />
</binding>
但是,我收到了这个错误:
无法检测队列是否是事务性的。
和
将“serverip\private$\services/eventservice.svc;poison”队列路径名转换为格式名时出错:指定的队列路径名无效。 (-1072824300, 0xc00e0014)。排队通道上的所有操作均失败。确保队列地址有效。 MSMQ 必须在启用 Active Directory 集成的情况下安装并且可以访问它。
队列路径名有效,并且启用了与Active Directory集成的MSMQ,所以我不明白为什么会出现错误???
编辑:我的毒物队列处理服务定义如下:
<ServiceBehavior(AddressFilterMode:=AddressFilterMode.Any, InstanceContextMode:=InstanceContextMode.Single, ConcurrencyMode:=ConcurrencyMode.Single)>
Public Class EventService
Implements IEventService
<OperationBehavior(TransactionScopeRequired:=True, TransactionAutoComplete:=True)>
Public Sub ProcessEvent(msg As EventMessage) Implements IEventService.ProcessEvent
End Sub
End Class
【问题讨论】:
-
根据错误消息,您的队列路径中混合了正斜杠和反斜杠。这是笔误吗?
-
MSMQ 上的 WCF 仅使用正斜杠;它被翻译了。例如,我成功地通过 net.msmq://serverip/private/services/eventservice.svc 为连接到主队列的服务发出请求。这只是我不知道的毒子队列连接。
标签: .net wcf msmq poison-queue