【问题标题】:Rhino.Esb "Could not find no message owner for "Rhino.Esb“找不到任何消息所有者”
【发布时间】:2011-02-15 00:23:21
【问题描述】:

我有一些服务,我希望能够从中发布和订阅消息。

我有一个后端总线控制台应用程序,它具有以下配置:

<configSections>
<section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor" />
</configSections>
<castle>
<facilities>
<facility id="rhino.esb">
<bus
                  threadCount="1"
                  numberOfRetries="5"
                  endpoint="rhino.queues://localhost:50001/SonaTribeESB_Backend"
                  name="backend"/>
<messages />
</facility>
</facilities>

并使用以下方式触发:

QueueUtil.PrepareQueue("backend");
_container = new WindsorContainer().AddFacility<WcfFacility>().Install(Configuration.FromAppConfig());
_container.Register(Component.For<IWindsorContainer>().Instance(_container));
Console.WriteLine("Backend: Starting to listen for incoming messages ...");
var host = new DefaultHost();
host.Start<BackendBootStrapper>();
Console.ReadLine();

然后我有一个 WCF 服务,它具有以下 esb 配置:

<facilities>
<facility id="rhino.esb" >
<bus
                    threadCount="1"
                    numberOfRetries="5"
                    endpoint="rhino.queues://localhost:50002/SonaTribeESB_AccountClient"
                    name ="AccountClient"/>
<messages>
<add
                      name="Messages"
                      endpoint="rhino.queues://localhost:50001/SonaTribeESB_Backend" />
</messages>
</facility>
</facilities>

以及 global.asax 中的以下内容:

Container.Install(Configuration.FromAppConfig());
Container.Kernel.AddFacility("rhino.esb", new RhinoServiceBusFacility());
var bus = Container.Resolve<IStartableServiceBus>();
bus.Start();

然后是具有以下配置的第二个服务:

<facilities>
<facility id="rhino.esb" >
<bus
                    threadCount="1"
                    numberOfRetries="5"
                    endpoint="rhino.queues://localhost:50003/SonaTribeESB_EventClient"
                    name ="EventClient"/>
<messages>
<add
                      name="Messages"
                      endpoint="rhino.queues://localhost:50001/SonaTribeESB_Backend" />
</messages>
</facility>
</facilities>

但是每当我尝试使用这个向总线发送消息时:

 _serviceBus.Send(new Esb.Messages.Account.EventAttendanceToggleMessage
                                {
                                    AccountProxy = eventAttendanceRequest.Account,
                                    EventProxy = eventAttendanceRequest.EventInstance,
                                    Attending = attending
                                });

我收到以下错误:

找不到 SonaTribe.Esb.Messages.Account.EventAttendanceToggleMessage 的消息所有者

有人知道我做错了什么吗?

【问题讨论】:

    标签: esb rhino-tools rhino-esb


    【解决方案1】:

    这个问题实际上与应用于 IoC 容器中的 RavenDb DocumentStore 的生活方式不正确有关!固定。

    【讨论】:

      猜你喜欢
      • 2021-09-21
      • 1970-01-01
      • 1970-01-01
      • 2014-09-24
      • 1970-01-01
      • 2014-11-12
      • 1970-01-01
      • 2016-09-19
      • 2011-04-03
      相关资源
      最近更新 更多