我的NServiceBus的日誌文件中有重複的條目,我擔心這意味着我沒有正確啓動它。NServiceBus的重複日誌條目
如:
2012-03-21 10:44:37.9820 | WARN | NServiceBus.Licensing |沒有有效的許可證 文件被發現。主機將被限制爲1個工作線程。
2012-03-21 10:44:37.9820 | WARN | NServiceBus.Licensing |找不到有效的文件 文件。主機將被限制爲1個工作線程。
2012-03-21 10:44:38.0610 | WARN | NServiceBus.Utils.MsmqUtilities |隊列 spy \ private $ \ error不存在。
2012-03-21 10:44:38.0610 | WARN | NServiceBus.Utils.MsmqUtilities |隊列 spy \ private $ \ error不存在。
我的配置是這樣的:
Configure.With()
.DefiningCommandsAs(t => typeof(ICommand).IsAssignableFrom(t))
.DefiningEventsAs(t => typeof(IEvent).IsAssignableFrom(t))
.DefiningMessagesAs(t => typeof(IMessage).IsAssignableFrom(t))
.Log4Net<NlogAppenderForLog4Net>(a => { })
.NinjectBuilder(Kernel)
.XmlSerializer()
.MsmqTransport()
.DefineEndpointName("subscriber.input")
.IsTransactional(true)
.PurgeOnStartup(false)
.MsmqSubscriptionStorage("subscriber")
.UnicastBus()
.LoadMessageHandlers()
.ImpersonateSender(false)
.CreateBus().Start(() => Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install());
和的app.config:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core"/>
<section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core"/>
<section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" requirePermission="false" />
</configSections>
<MessageForwardingInCaseOfFaultConfig ErrorQueue="error"/>
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="Publisher.Events" Endpoint="publisher.input" />
<add Messages="Publisher2.Events.Message, Publisher2.Events" Endpoint="publisher2.input" />
</MessageEndpointMappings>
</UnicastBusConfig>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<runtime>
</runtime>
</configuration>
的鏈接斷開鏈接 – Marius 2015-10-27 07:26:07
更新,謝謝! – 2015-11-06 13:44:31