0

更新 問題が見つかりました。ICommand から継承していなかったので、規則を追加しましたが、次の例外が発生しています。

宛先キュー「償還」が見つかりませんでした。構成ファイルの UnicastBusConfig セクションの MessageEndpointMappings で、この種のメッセージ (Reimbursement.Messages.Commands.RequestForReimbursementCommand、Reimbursement.Messages、Version=1.0.0.0、Culture=neutral、PublicKeyToken=null) の宛先を誤って構成した可能性があります。指定されたキューがまだ作成されていないか、削除されている場合もあります。

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 アセンブリを参照しているため、これを解決できない理由がわかりません。

どんな助けでも素晴らしいでしょう!

4

2 に答える 2

1

このメッセージThe destination queue '*' could not be found.は通常、サービスがパブリッシャーをサブスクライブしようとしているが、パブリッシュがまだ実行されていないためにキューが作成されている場合に発生します。

エンドポイントは独自のキューを作成するだけで、サブスクライブするキューや、メッセージを送信する他のサービスのキューは作成しません。

このメッセージNo destination could be found for message typeは通常、設定で宛先が定義されていない場合、メッセージ規則に一致がない場合、または正しいインターフェイス(ICommandIEventまたはIMessage)を継承していない場合に発生します。

于 2015-05-15T18:53:22.167 に答える