【问题标题】:NServiceBus SqlTransport - Unable to resolve message type for sendingNServiceBus SqlTransport - 无法解析用于发送的消息类型
【发布时间】:2015-05-14 14:07:32
【问题描述】:

更新 我发现了问题。我没有从 ICommand 继承,所以我添加了约定,但是现在我收到以下异常:

找不到目标队列“报销”。你可能有 错误配置了此类消息的目的地 (Reimbursement.Messages.Commands.RequestForReimbursementCommand, Reimbursement.Messages,版本=1.0.0.0,文化=中性, PublicKeyToken=null) 在 MessageEndpointMappings 的 配置文件中的 UnicastBusConfig 部分。它也可能是 给定队列尚未创建或已创建的情况 已删除。

我正在使用 SqlTransport 为我们公司评估 NServiceBus,但遇到了配置问题。

这是我的发件人的 app.config:

<configuration>
  <configSections>
    <section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
    <section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" />
  </configSections>
  <MessageForwardingInCaseOfFaultConfig ErrorQueue="error" />  
  <startup> 
      <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <appSettings>
    <add key="NServiceBus/Outbox" value="true"/>
  </appSettings>
  <connectionStrings>
    <add
      name="NServiceBus/Transport"
      connectionString="Data Source=INLS-03466\ANABOLIC; Initial Catalog=CMS; Integrated Security=True;"/>
    <add
      name="NServiceBus/Persistence"
      connectionString="Data Source=INLS-03466\ANABOLIC; Initial Catalog=CMS; Integrated Security=True;"/>
    <add
      name="NServiceBus/Transport/Reimbursement"
      connectionString="Data Source=INLS-03466\ANABOLIC; Initial Catalog=Reimbursement; Integrated Security=True;"/>
  </connectionStrings>
  <UnicastBusConfig>
    <MessageEndpointMappings>
      <add Assembly="Reimbursement.Messages" Endpoint="Reimbursement" />
    </MessageEndpointMappings>
  </UnicastBusConfig>
</configuration>

当我发送命令时,我收到以下异常:

找不到消息类型的目的地 Reimbursement.Messages.Commands.RequestForReimbursementCommand。查看 这部分的配置 此特定消息类型或其条目的端点 组装。

发件人引用了 Reimbursement.Messages 程序集,所以我不确定它为什么无法解决这个问题。

任何帮助都会很棒!

【问题讨论】:

    标签: nservicebus nservicebus5


    【解决方案1】:

    The destination queue '*' could not be found. 消息通常发生在服务想要订阅发布者但发布尚未运行因此它已创建其队列时。

    端点只创建自己的队列,而不是它订阅的队列或发送消息的其他服务的队列。

    消息No destination could be found for message type 通常发生在配置中未定义目标、消息约定不匹配或未继承正确接口(@98​​7654323@、IEventIMessage)时。

    【讨论】:

      【解决方案2】:

      不知道为什么,但我删除/重新添加了对外部消息项目的引用,它现在似乎可以工作了。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-04-12
        • 1970-01-01
        • 2015-02-02
        • 1970-01-01
        • 1970-01-01
        • 2015-03-21
        • 1970-01-01
        • 2021-01-26
        相关资源
        最近更新 更多