Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does CLIENT_ACKNOWLEDGE mode work when there are two or more TopicSubscribers to the same topic within a session?

mode session topic
0
Posted

How does CLIENT_ACKNOWLEDGE mode work when there are two or more TopicSubscribers to the same topic within a session?

0

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.