升级到最新的 NServiceBus 和 NServiceBus温莎城堡

发布于 2024-12-13 16:52:58 字数 1450 浏览 0 评论 0原文

我正在尝试获取最新的 nservicebus 和 castle Windsor:

我的问题是,现在运行的确切代码 - 不再运行:

var _container = new WindsorContainer();
           NServiceBus.Configure.With()
               .CastleWindsorBuilder(_container) 
               .XmlSerializer()
               .MsmqTransport()
               .UnicastBus()
                   .DoNotAutoSubscribe(); 

是的 - 那是旧的示例代码,仍然在 3.0 的源代码中

实际的代码我我试图运行的是:

    var container = new WindsorContainer(new
XmlInterpreter("Windsor.config"));
           container.Install(FromAssembly.This());
           Configure.With()
                .Log4Net()
                .XmlSerializer()
               .CastleWindsorBuilder(container) 
               .MsmqTransport()
                    .IsTransactional(true)
                    .PurgeOnStartup(false)
               .MsmqSubscriptionStorage()
               .UnicastBus()
                    .ImpersonateSender(false)
                    .LoadMessageHandlers()
               .IsTransactional(true)
               .CreateBus().Start();

其中没有更多内容,但认为额外的位可能会导致 问题 - 即使是最简单的尝试 温莎集装箱让它痛苦地死去。

错误是:

Component 89374c5e-29e5-4506-ba2e-5618fdc0d786 could not be
registered. There is already a component with that name. Did you want
to modify the existing component instead? If not, make sure you
specify a unique name.

我实际上并没有注册任何东西,所以 NSB 必须尝试注册某些东西两次?

w://

I'm trying to get to the latest of nservicebus and castle windsor:

My issue is that now the exact code that did run - no longer does:

var _container = new WindsorContainer();
           NServiceBus.Configure.With()
               .CastleWindsorBuilder(_container) 
               .XmlSerializer()
               .MsmqTransport()
               .UnicastBus()
                   .DoNotAutoSubscribe(); 

Yep - that's the old example code that is still in the source for 3.0

The actual code I'm trying to run is:

    var container = new WindsorContainer(new
XmlInterpreter("Windsor.config"));
           container.Install(FromAssembly.This());
           Configure.With()
                .Log4Net()
                .XmlSerializer()
               .CastleWindsorBuilder(container) 
               .MsmqTransport()
                    .IsTransactional(true)
                    .PurgeOnStartup(false)
               .MsmqSubscriptionStorage()
               .UnicastBus()
                    .ImpersonateSender(false)
                    .LoadMessageHandlers()
               .IsTransactional(true)
               .CreateBus().Start();

Not much more in it but thought the extra bits might cause the
problem - even the most simple attempt at getting it started with the
windsor container makes it die a painful death.

The error is:

Component 89374c5e-29e5-4506-ba2e-5618fdc0d786 could not be
registered. There is already a component with that name. Did you want
to modify the existing component instead? If not, make sure you
specify a unique name.

It's not like I'm actually registerign anything so NSB must be trying to reg something twice maybe?

w://

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

差↓一点笑了 2024-12-20 16:52:58

这是 nsb/castle 中的一个已知错误。现在固定在master上

This is a known bug in nsb/castle. Fixed on the master now

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文