gpt4 book ai didi

java - Websphere MQ 主题 - 它们是否严格排序?

转载 作者:行者123 更新时间:2023-11-30 08:26:13 24 4
gpt4 key购买 nike

是否在您订阅的 Websphere MQ 主题上接收到严格排序的消息?

换句话说,以类似于queue的方式,假设您的连接保持不变,您就可以保证以与发送时相同的顺序接收topic消息?

最佳答案

根据 JMS 规范

JMS defines that messages sent by a session to a destination must be received
in the order in which they were sent. This defines a partial ordering
constraint on a session’s input message stream.

JMS does not define order of message receipt across destinations or across
a destination’s messages sent from multiple sessions. This aspect of a
session’s input message stream order is timing-dependent. It is not under
application control.

还有

Although clients loosely view the messages they produce within a session
as forming a serial stream of sent messages, the total ordering of this stream
is not significant. The only ordering that is visible to receiving clients is
the order of messages a session sends to a particular destination.
Several things can affect this order like message priority,
persistent/non persistent etc.

因此,要回答您的问题,并非真正特定于 JMS 提供者 接收到的顺序消息是什么。他们将按照与上述信息一起发送的相同顺序收到。然而,消息传递到服务器的顺序将受到消息优先级、持久/非持久等限制的限制。

关于java - Websphere MQ 主题 - 它们是否严格排序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21727084/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com