0
我有2個應用程序,客戶端使用的桌面應用程序,執行後端處理的Win服務。我希望能夠通過使用Rhino Service Bus的消息觸發後端處理。這條消息可能來自客戶端應用程序,它可能來自win服務,我並不在乎誰觸發它。所以我需要pub sub。問題是,我可以從我的控制檯應用程序觸發它,當我試圖從我的服務觸發我得到一個錯誤,沒有用戶的消息。我的配置有什麼問題?Rhino ESB發佈/訂閱後端
控制檯的app.config
<rhino.esb>
<bus threadCount="1" numberOfRetries="5" endpoint="msmq://localhost/console.debug" />
<messages>
<add name="MyMessages" endpoint="msmq://localhost/host.debug" />
</messages>
運服務的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());
}