我正在从 ASP.NET MVC 客户端尝试 Rhino 服务总线,不确定它是否有用于用户响应的内置设施。在 Alexandria 智能客户端示例中,IServiceBus.Reply 将自然地工作,因为每个用户的本地队列都有不同的 IP。 (尽管如果他们的连接暂时断开会发生什么......?)
对于具有类似功能的网站,我是否需要为每个用户构建一个响应队列?那么队列名称的一部分可能包含 UserId,这样 Reply 就会返回到正确的位置?它们可以共享相同的端口,只是 URL 不同吗?
I'm trying out Rhino Service Bus from an ASP.NET MVC client and not sure if it has a built in facility for User responses. In the Alexandria smart client example IServiceBus.Reply will work naturally as each user will have a different IP for their local queue. (Although what happens if their connection drops out momentarily..?)
For a web site with similar functionality though, do I need to construct a response queue for every User? So part of the queue name might include the UserId and that way Reply will go back to the right place? Can they share the same port and just differ in URL?
发布评论
评论(2)
为每个用户提供一个相关 ID 而不是单独的队列要理想得多。
您关于“用户”响应的问题,不,它没有内置任何内容。通常您可以通过长轮询等方式来实现此目的。
It is much more ideal to have a correlation id rather than separate queues for each user.
Your question about "user" responses, no it doesn't have anything built in. Typically you can achieve this with something like long polling.
我想我正在寻找这个,但当时并不知道:
http://ayende.com/blog/140289/setting-up-a-rhino-service-bus-application-part-iindash-one-way-bus
虽然无法获取Sagas 收到第二条消息,想知道是否是因为 IOnewayBus 没有发布,因为 Saga 示例似乎使用 Publish 而不是 Send,但我可能只是使用错误。不过 CorrelationIds 匹配。
I guess I was looking for this but didn't know it at the time:
http://ayende.com/blog/140289/setting-up-a-rhino-service-bus-application-part-iindash-one-way-bus
Although having trouble getting the Sagas to receive a second message, wonder if it's because IOnewayBus doesn't publish as the Saga example seems to use Publish instead of Send, but I'm probably just using it wrong. CorrelationIds match though.