NServiceBus SqlTransport - 无法解析要发送的消息类型

NServiceBus SqlTransport - Unable to resolve message type for sending

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

The destination queue 'Reimbursement' could not be found. You may have misconfigured the destination for this kind of message (Reimbursement.Messages.Commands.RequestForReimbursementCommand, Reimbursement.Messages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null) in the MessageEndpointMappings of the UnicastBusConfig section in your configuration file. It may also be the case that the given queue just hasn't been created yet, or has been deleted.

我正在使用 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>

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

No destination could be found for message type Reimbursement.Messages.Commands.RequestForReimbursementCommand. Check the section of the configuration of this endpoint for an entry either for this specific message type or for its assembly.

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

任何帮助都会很棒!

不知道为什么,但我 removed/re-added 我引用了外部消息项目,它现在似乎可以正常工作。

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

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

消息No destination could be found for message type通常发生在配置中没有定义目的地、消息约定不匹配或没有继承正确的接口(ICommandIEventIMessage).