Rebus を pub/sub プロトコルで使用できず、共有アセンブリからメッセージを発行する複数のエンドポイントにサブスクライブできない理由はありますか?
これで Rebus サブスクライバーを構成しようとすると:
<rebus inputQueue="ocs.subscriber.input" errorQueue="ocs.subscriber.error" workers="1" maxRetries="5">
<endpoints>
<add messages="D3A.Messages" endpoint="ocs.publisher.input" />
<add messages="D3A.Messages" endpoint="ocs.publisher.input@osi2552" />
</endpoints>
</rebus>
で例外がスローされます
.Transport(t => t.UseMsmqAndGetInputQueueNameFromAppConfig())
スローされる例外は次のとおりです。
An unhandled exception of type 'Rebus.Configuration.ConfigurationException' occurred in Rebus.dll
Additional information:
An error occurred when trying to parse out the configuration of the RebusConfigurationSection:
System.Configuration.ConfigurationErrorsException: The entry 'D3A.Messages' has already been added. (C:\projects\OCS.Subscriber\bin\Release\OCS.Subscriber.vshost.exe.Config line 22)
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at Rebus.Configuration.RebusConfigurationSection.LookItUp()
at Rebus.Transports.Msmq.MsmqConfigurationExtension.UseMsmqAndGetInputQueueNameFromAppConfig(RebusTransportConfigurer configurer)
これは私には少し奇妙に思えます。複数のパブリッシャーに Rebus サブスクライバーを持たせることは、完全に有効なユース ケースのように思えます。一部のパブリッシャーは、共通の POCO アセンブリを共有しています。
この背後にある理由は何ですか...そして(より重要なことに)Rebusでこれを達成する方法はありますか?
また、Rebus がこの例外をログに追加することを期待していました (私は log4net を使用しています) が、Rebus の構成時にスローされた例外はログに記録されないようです。これは間違いですよね?