【发布时间】:2014-03-02 14:53:10
【问题描述】:
我有 2 个应用程序,客户端使用的桌面应用程序,执行后端处理的 Win 服务。我希望能够使用 Rhino 服务总线通过消息触发后端处理。此消息可能来自客户端应用程序,也可能来自 win 服务,我并不关心是谁触发的。所以我需要pub sub。问题是我可以从我的控制台应用程序中很好地触发它,当我尝试从我的服务中触发时,我收到一个错误消息没有订阅者。我的配置有什么问题?
控制台 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 服务 app.config
<rhino.esb>
<bus threadCount="1" numberOfRetries="5" endpoint="msmq://localhost/host.debug" />
<messages />
两个应用发送消息的代码是一样的:
private IServiceBus _serviceBus;
....
public void Trigger()
{
_serviceBus.Publish(new myTriggerCommand());
}
【问题讨论】:
标签: servicebus rhino-esb