我遵循NServiceBus 入门 - 代码第一篇文章,当我尝试从客户端应用程序 (NServiceBusDemo.Client) 发送消息时,出现以下异常:
2013-05-27 12:27:50,514 [7] 错误 NServiceBusDemo.Client.SendOrder [(null)] <(null)> - 启动端点时出现问题。Common.Logging.ConfigurationException:找不到目标队列“server@jasper”。您可能在配置文件的 UnicastBusConfig 部分的 MessageEndpointMappin gs 中错误地配置了此类消息的目的地 (NServiceBusDemo.Messages.Commands.PlaceOrder)。也可能是给定队列尚未创建或已被删除的情况。- --> NServiceBus.Unicast.Queuing.QueueNotFoundException: 无法将消息发送到地址:[server@jasper] ---> System.Messaging.MessageQueueException: 队列不存在或者您没有足够的权限来执行手术。
自从我使用 NServiceBus 已经有很长时间了,但我确实记得必须添加我已经完成的消息端点映射(教程中没有提到):
<UnicastBusConfig ForwardReceivedMessagesTo="audit">
<MessageEndpointMappings>
<add Messages="NServiceBusDemo.Messages" Endpoint="NServiceBusDemo.Server"/>
</MessageEndpointMappings>
</UnicastBusConfig>
当我查看消息队列控制台时,我创建了以下私有队列:
- nservicebusdemo.client
- nservicebusdemo.client.retries
- nservicebusdemo.server
- nservicebusdemo.server.retries
- nservicebusdemo.server.timeouts
- nservicebusdemo.server.timeoutsdispatcher