Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有一个消息队列和多个独立程序,它们尝试通过以下方式从该队列接收消息
sess.receive();
哪个客户端程序实际上会收到消息?这是怎么决定的?谢谢你
在所有条件相同的情况下,任何接收者都可以接收到消息(但只能接收其中一个)。从架构上讲,您不应该关心哪个接收者收到消息。如果您在接收器中有不同的消息处理,您应该考虑使用选择器或不同的队列。