【问题标题】:Rhino ESB publish/subscribe backendRhino ESB 发布/订阅后端
【发布时间】: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


    【解决方案1】:

    所以看来 RSB 无法处理向自己发布消息。我发现这个博客在同一过程中发布和消费,这似乎是一个合理的解决方案。但是,最后我选择不使用消息在主机内触发。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多