问题描述
我正在同一个目的地中添加两个JMS消息。这两个消息将按照我添加的消息的相同顺序进行接收,或者是否有反向排序的机会,也就是首先在目的地收到该消息首先被检索。我正在添加到目的地:
producer.send(Msg1);
producer.send(Msg2);
Msg1
和 Msg2
将在所有情况下依次添加(如网络故障和延迟等)。
p>消息排序不保证(而不是规范规定),而 说明了为什么的细节。另请参阅Stack Overflow post 。
I am adding two JMS messages in the same destination sequentially. Will both of these messages be received in the same order in which I have added them or is there a chance for reverse ordering, that is, which ever the message is received first in the destination will be retrieved first.
I am adding into a destination as:
producer.send(Msg1);
producer.send(Msg2);
Msg1
and Msg2
will be added sequentially in all the cases (like network failures and latency. etc.)?
Message ordering is not guaranteed (and not mandated by the specification) and Total JMS Message ordering explains the details of why. Also see the Stack Overflow post How to handle order of messages in JMS?.
这篇关于JMS队列消息接收命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!