Java Websphere MQ主题-它们的顺序是否严格?
您订阅的Websphere MQJava Websphere MQ主题-它们的顺序是否严格?,java,messaging,ibm-mq,jms-topic,Java,Messaging,Ibm Mq,Jms Topic,您订阅的Websphere MQ主题上是否接收到严格排序的消息 换句话说,与队列的方式类似,如果您的连接得到维护,您是否保证按照与发送相同的顺序接收主题消息?符合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
主题
上是否接收到严格排序的消息
换句话说,与队列
的方式类似,如果您的连接得到维护,您是否保证按照与发送相同的顺序接收主题
消息?符合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.
也
因此,要回答您的问题,
并不是真正的JMS提供者特定的
接收到的订单消息。它们将按照与上述信息一起发送的相同顺序接收。但是,消息传递到服务器的顺序将受到诸如消息优先级、持久/非持久等限制。好的,我只是想检查这是否适用于主题
以及队列
,是否正确?感谢它适用于目的地
,目的地既可以是队列
也可以是主题
。除了Aniket关于规范的评论外,通常的WMQ约束也适用。例如,如果消息穿过QMgr到QMgr通道,并且具有不同的优先级或持久性,如果消息可以遵循多条路径,如果消息传递到的队列上有多个使用者(因为在封面下主题将消息传递到队列,即使应用程序不将其视为队列),如果队列溢出到DLQ等,则它们可能不会按照发送的顺序到达。规范中提到了这一点,其中谈到了多个目的地。
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.