将消息转发到发布者/订阅者的审核队列
我已经设置了发布者/订阅者,并希望将收到的消息发送到审核队列。这是我的 app.config 摘录
<MsmqTransportConfig
InputQueue="MyPublisherInputQueue"
ErrorQueue="error"
NumberOfWorkerThreads="1"
MaxRetries="5"
/>
<UnicastBusConfig
DistributorControlAddress=""
DistributorDataAddress=""
ForwardReceivedMessagesTo="AuditQueue">
<MessageEndpointMappings>
</MessageEndpointMappings>
</UnicastBusConfig>
,但我的消息没有推送到审核队列 我的端点配置就是这样,订阅者和发布者接口参考
public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, AsA_Publisher
{
}
任何帮助都将受到欢迎。
I have setup a publisher/subscriber and wanted to send the received message to audit queue. Here my app.config extract
<MsmqTransportConfig
InputQueue="MyPublisherInputQueue"
ErrorQueue="error"
NumberOfWorkerThreads="1"
MaxRetries="5"
/>
<UnicastBusConfig
DistributorControlAddress=""
DistributorDataAddress=""
ForwardReceivedMessagesTo="AuditQueue">
<MessageEndpointMappings>
</MessageEndpointMappings>
</UnicastBusConfig>
but my messages are not pushed to the audit queue
my endpointconfig is like that, with both subscriber and publisher interface reference
public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, AsA_Publisher
{
}
any help will be welcomed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否有消息处理程序在此端点处理消息?您能否验证这些消息处理程序是否正在处理消息?
我相信 NServiceBus 只会转发它具有用户配置的消息处理程序的消息,而不仅仅是任何实现 IMessage 的消息。如果确实如此,您会在审核队列中看到大量消息,用于订阅请求和完成响应以及 NServiceBus 内部的其他内容。
Do you have message handlers handling messages at this endpoint? And can you verify that messages are being processed by these message handlers?
I believe NServiceBus will only forward messages it has user-configured message handlers for, not just anything that wanders by that implements IMessage. If it did, you'd see a lot of messages in your audit queues for subscription requests and completion responses and other things that are internal to NServiceBus.
为什么需要 AsA_Server 和 AsA_Publisher? AsA_Publisher 包含 AsA_Server 的所有功能。我想说这就是您的审核队列失败的原因。
Why do you want AsA_Server and AsA_Publisher? AsA_Publisher includes all the functionality of AsA_Server. I would say this is why your audit queue is failing.