Rhino.esb «не мог найти владельца сообщений»
-
27-10-2019 - |
Вопрос
У меня есть некоторые услуги, которые я хочу иметь возможность публиковать и подписаться на сообщения.
У меня есть приложение для консоли Backend Bus, которое имеет следующую конфигурацию:
<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
Кто -нибудь понял, что я делаю не так?
Решение
Проблема с этим была на самом деле связана с тем, что неверный образ жизни применяется к Ravendb DocumentStore в контейнере IOC! исправлено.