代码之家  ›  专栏  ›  技术社区  ›  wizzardz Nikhil

尝试使用Nservice总线时出错

  •  5
  • wizzardz Nikhil  · 技术社区  · 14 年前

    我是新的NServcie总线和即时通讯试图实现发布和订阅的消息。这是我得到的错误

    启动终结点时出现异常,已记录错误。原因:找不到目标队列“mygateway”。您可能在配置文件的UnicastBusConfig节的MessageEndpointMappings中错误配置了此类消息的目标(NServiceBus.Unicast.Transport.CompletionMessage)。也可能是给定队列尚未创建或已被删除。

    这是我在app config中使用的配置

             <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”队列不是自动创建的?我做错什么了吗?请帮忙。

    亚历克斯。

    1 回复  |  直到 14 年前
        1
  •  7
  •   David Boike    14 年前

    您配置的这个应用程序只“拥有”MsmqTransportConfig中的队列,即“publisherqueue”和“error”。这些是它将尝试为您创建的唯一队列。

    MessageEndpointMappings部分定义了“远程”队列,即您希望从消息发送消息到mygateway,或者订阅来自mygateway的消息。另一个端点,以“mygateway”作为其输入队列,将负责它的启动。