...
Per-message acknowledgment can be used to ensure that the subscriber client acknowledges each message that is received. Any message that is not acknowledged will go through the same process as when client acknowledged such as the message getting rejected. The subscriber can enable this feature by using one of the following options when creating the session.
Use the
org.wso2.andes.jms.Session.PER_MESSAGE_ACKNOWLEDGE
enum available in the andes-client
JAR as shown below.Code Block import org.wso2.andes.jms.Session; QueueSession queueSession = queueConnection.createQueueSession(false, Session.PER_MESSAGE_ACKNOWLEDGE);
Or, use the value 259 as shown below.
Code Block QueueSession queueSession = queueConnection.createQueueSession(false, 259);
...