Im getting an error when I try to send a message from a Test Project, This is the exception message
Could not find a message owner for C2C.RhinoUtil.EventServiceBus at Rhino.ServiceBus.Impl.MessageOwnersSelector.GetEndpointForMessageBatch(Object[] messages) at Rhino.ServiceBus.Impl.DefaultServiceBus.Send(Object[] messages) at C2C.Infraestructura.Aspect.EventDispatcherAspect.Intercept(IInvocation invocation) in f:\Proyectos\C2C\Desarrollo\Trunk\C2C.Infraestructura\Aspect\EventDispatcherAspect.cs:line 44
this is my config of my test app.config (this work like a client that send messages to a central application)
<rhino.esb>
<bus threadCount="1" numberOfRetries="5" endpoint="rhino.queues://localhost:50002/RhinoServiceBusTest" name="client" />
<messages>
<add name="messagges" endpoint="rhino.queues://localhost:50001/RhinoServiceBusBackend" />
</messages>
<assemblies>
<add assembly="Rhino.ServiceBus.RhinoQueues" />
</assemblies>
this is my backend config
<rhino.esb>
<bus threadCount="1" numberOfRetries="5" endpoint="rhino.queues://localhost:50001/RhinoServiceBusBackend" name="backend" />
<assemblies>
<add assembly="Rhino.ServiceBus.RhinoQueues" />
</assemblies>
and this is part of my code to send a message
QueueUtil.PrepareQueue("client");
var host = new DefaultHost();
host.Start<ClientBootStrapper>();
//Console.WriteLine("Client 1: Hit enter to send message");
//Console.ReadLine();
var bus = host.Bus as IServiceBus;
var eventSB = new EventServiceBus();
eventSB.Nombre = methodName;
eventSB.Service = invocation.TargetType.FullName;
eventSB.Data = (arguments as BusinessEntity).UnProxy(); ;
try
{
bus.Send(eventSB);
}
catch (Exception)
{
throw;
}
Basically Im intercepting all the transactions and try to notify to another backend application, but
From my test method I create
The problem was on the app.config of the test project, you have to set the bus name like the entity namespace, like this
<messages>
<add name="C2C.RhinoUtil" endpoint="rhino.queues://localhost:50001/RhinoServiceBusBackend" />
</messages>
where "C2C.RhinoUtil" is the namespace of my class "EventServiceBus" that is sent in the message