A subscriber client receiving messages from a queue or topic in the broker should be configured to send an acknowledgement acknowledgment back to the broker when the messages are received. There are several acknowledgement acknowledgment methods that can be used by the subscriber.
...
Configuring the time taken to acknowledge messages
There are several acknowledgement acknowledgment models defined in JMS specification 1.1. To configure the time within which consumers can acknowledge messages, you can set the AndesAckWaitTimeOut
entry in the JMS client as follows:
Code Block |
---|
System.setProperty("AndesAckWaitTimeOut", "30000"); |
If the acknowledgement acknowledgment fails within the above time, the client informs the MB server broker that the message is rejected. The message is then scheduled to be redelivered later by the server.
Configuring standard JMS message
...
acknowledgment patterns
The following are acknowledgement acknowledgment patterns introduced by JMS:
- Auto Acknowledge
- Duplicates Allowed
- Client Acknowledge
- Transacted Acknowledgement
Configuring per-message
...
acknowledgment
With Per Message Acknowledge we can acknowledge each message as per requirement. Any message that is not acknowledged will go through the same process as when client acknowledged such as the message getting rejected.
...