wiz*_*rdz 5 nservicebus message-queue
我是NServcie总线的新手,我正试图实现发布和订阅消息.这是我得到的错误
启动端点时出现异常,已记录错误.原因:找不到目标队列"mygateway".您可能在配置文件中的UnicastBusConfig部分的MessageEndpointMappings中错误配置了此类消息的目标(NServiceBus.Unicast.Transport.CompletionMessage).也可能是尚未创建给定队列的情况,或已被删除.
这是我在app config中使用的配置
Run Code Online (Sandbox Code Playgroud)<MsmqTransportConfig InputQueue="publisherqueue" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5" /> <UnicastBusConfig DistributorControlAddress="" DistributorDataAddress="" ForwardReceivedMessagesTo=""> <MessageEndpointMappings> <add Messages="Messages" Endpoint="mygateway" /> </MessageEndpointMappings> </UnicastBusConfig> <MsmqSubscriptionStorageConfig Queue="GateWaySubscriptions" />
我的问题是为什么这个"mygateway"队列不是自动创建的?我做错了吗?请帮忙.
谢谢Alex.
这个应用程序只配置为"拥有"(松散地使用该术语)MsmqTransportConfig中的队列,即"publisherqueue"和"error".这些是它将尝试为您创建的唯一队列.
您的MessageEndpointMappings部分定义了"远程"队列,即您希望将消息从Messages发送到mygateway,或订阅来自mygateway的消息.以"mygateway"作为输入队列的另一个端点将负责它.
所以你的应用告诉你的是"我看到你对与mygateway交换消息感兴趣,但我敲了敲门,没人在家."