How does CLIENT_ACKNOWLEDGE mode work when there are two or more TopicSubscribers to the same topic within a session?
From Section 6.11 of the JMS 1.0.2 Specification: A TopicSession allows the creation of multiple TopicSubscribers per destination, it will deliver each message for a destination to each TopicSubscriber eligible to receive it. Each copy of the message is treated as a completely separate message. Work done on one copy has no affect on the other; acknowledging one does not acknowledge the other; one message may be delivered immediately while another waits for its consumer to process messages ahead of it. The Message.acknowledge method is documented to acknowledge the receipt of all messages consumed by the session. Thus, if msgA is delivered to topic subscribers TS1 and TS2 of the same session, and TS1 synchronously receives its copy of msgA and acknowledges it, TS2 will still be able to synchronously receive its copy of the message. However, if TS1 receives its copy of msgA and then TS2 receives its copy of msgA, acknowledging receiving the message from TS2 will acknowledge both the msgA
Related Questions
- Why doesn the Flashcard Mode offer me the opportunity to choose the number of questions loaded for a test session (like the Test Mode and Learning Mode do)?
- How does CLIENT_ACKNOWLEDGE mode work when there are two or more TopicSubscribers to the same topic within a session?
- Is Console Session mode supported?