NServiceBus:进程发布到多个队列的要求
我们有一个进程已经使用 NServiceBus 向系统中运行的其他进程发布消息。我想向此进程添加附加功能,这将要求它将消息发布到其他进程,但我希望能够使用新类型的消息写入另一个队列。最好,我不想将消息混合在同一队列上,因为它们具有不同的优先级。我所看到的一切都表明 NServiceBus 仅支持每个进程一个队列。这是正确的吗?
如果是这样,那么有人可以建议一个好的解决方法吗?我唯一能想到的是将新队列放置在单独的“NServiceBus Hub”进程中,然后使用 WCF 集成功能将新消息进程间从我的进程中继到集线器,以便插入到新队列中。
谢谢。
We have a process that uses NServiceBus already to publish messages to other processes running in our system. I want to add additional functionality to this process which will require it to publish messages to other processes, but I want to be able to write to another queue with the new type of message. Preferably, I don’t want to mix messages together on the same queue as they have different priorities. All that I have seen indicates that NServiceBus only supports one queue per process. Is this correct?
If this is so, then can anyone suggest a good workaround? The only one I can think of is to house the new queue in a separate “NServiceBus Hub” process, then use the WCF integration feature to relay the new message inter-process from my process to the hub for insertion on the new queue.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您对在单个队列上混合高优先级和低优先级消息的担忧是有道理的。
这需要在发送方和接收方双方解决。
发送方不会在本地写入其自己的单个队列。相反,当发送者向接收者发送消息时,发送者会写入特定于该接收者的临时本地队列。
因此,您有两个潜在的问题:
如果是这种情况,您可以执行以下一项或两项操作:
这将按优先级为您提供多个端点,并且它们之间有清晰的分离。
Your concern about mixing high and low priority messages on a single queue is valid.
This needs to be addressed at both the sender and receiver side.
The sender does not write locally to it's own single queue. Rather when it sends a message to a recipient the sender writes to a temporary local queue specific to that recipient.
So you have two potential problems:
If this is the case you can do one or both of:
This will give you the multiple endpoints by priority with a clean separation between them.