更新 問題が見つかりました。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 アセンブリを参照しているため、これを解決できない理由がわかりません。
どんな助けでも素晴らしいでしょう!