3

すべての環境で Windows 7 64 ビットを実行しています。私の 2 つのアセンブリを含めることによってすべてのメッセージを暗黙的に登録することは、開発では機能しますが、QA と Prod では明示的な登録が必要です。それ以外の場合、NService は起動時に例外をスローします。誰かが同様に遭遇しましたか?解決策はありますか?

例外

Source:NServiceBus.Core System.InvalidOperationException - No destination could be found for message type
xyz.Application.Claims.Messaging.IGlassWorkflowEventMessage. Check the <MessageEndpointMapping> section of the configuration 
of this endpoint for an entry either for this specific message type or for its assembly.
Stack:   at NServiceBus.Unicast.UnicastBus.Subscribe(Type messageType, Predicate`1 condition)
at CEI.Application.Claims.GlassSubscriber.SubscriberEndpointStartup.Run() in c:\xyz\tfs\Claimslink\DEV\Bus\GlassSubscriber\Config\SubscriberEndpointStartup.cs:line 36
at NServiceBus.Host.Internal.ConfigManager.<>c__DisplayClass1.<Startup>b__0()

私の設定エントリ

<!--This works in my development environment-->
<MsmqTransportConfig InputQueue="GlassSubscriber" ErrorQueue="GlassSubscriberError" NumberOfWorkerThreads="1" MaxRetries="2"/>
<UnicastBusConfig>
<MessageEndpointMappings>

  <!--Just add assemblies, all messages recognized -->
  <add Messages="xyz.shared.impl" Endpoint="msgsvcpubinputqueue"/>
  <add Messages="xyz.Claims.impl" Endpoint="msgsvcpubinputqueue"/>
</MessageEndpointMappings>
</UnicastBusConfig>


 <!--QA and Production always require explicit message registrations??-->
 <MsmqTransportConfig InputQueue="GlassSubscriber" ErrorQueue="GlassSubscriberError" NumberOfWorkerThreads="1" MaxRetries="2"/>
 <UnicastBusConfig>
<MessageEndpointMappings>
  <add Messages="xyz.shared.impl" Endpoint="msgsvcpubinputqueue"/>
  <add Messages="xyz.Claims.impl" Endpoint="msgsvcpubinputqueue"/>

  <!--We have dozens of messages, explicitly registering for each subscriber is a pain-->

  <add Messages="xyz.Application.Claims.Messaging.IGlassWorkflowEventMessage, xyz.Claims.impl" Endpoint="msgsvcpubinputqueue"/>
  <add Messages="xyz.Application.Claims.Messaging.GlassWorkflowEventMessage, xyz.Claims.impl" Endpoint="msgsvcpubinputqueue"/>
</MessageEndpointMappings>
 </UnicastBusConfig>
4

0 に答える 0