Rhino ESB publish/subscribe backend

65 views Asked by At

I have 2 applications, Desktop app the clients use, Win Service that does the backend processing. I want to be able to trigger the backend processing via a message using Rhino Service Bus. This message may come from the client app, it may come from the win service, I don't really care who triggers it. So I need pub sub. The problem is that I can trigger it just fine from my console app, when I try to trigger from my service I get an error there are no subscribers for the message. What is wrong in my configs?

Console app.config

<rhino.esb>
<bus threadCount="1" numberOfRetries="5" endpoint="msmq://localhost/console.debug" />
<messages>
  <add name="MyMessages" endpoint="msmq://localhost/host.debug" />
</messages>

Win Service app.config

<rhino.esb>
<bus threadCount="1" numberOfRetries="5" endpoint="msmq://localhost/host.debug" />
<messages />

The code for sending a message is the same in both apps:

private IServiceBus _serviceBus;
....
public void Trigger()
{
    _serviceBus.Publish(new myTriggerCommand()); 
}
1

There are 1 answers

0
Ryan Langton On

So it seems RSB is unable to handle publishing messages to itself. I found this blog for publishing and consuming in the same process, which appears to be a reasonable solution. However, in the end I opted just to not use messaging for triggering within the host.

http://blog.irm.se/blogs/eric/archive/2011/06/19/Consuming-Events-in-the-Same-Process-as-the-Publisher-with-Rhino-Service-Bus.aspx