Class AutoAcknowledger

  • All Implemented Interfaces:
    Acknowledger

    public class AutoAcknowledger
    extends Object
    implements Acknowledger
    Used by session to automatically acknowledge a client's receipt of a message either when the session has successfully returned from a call to receive or when the message listener the session has called to process the message successfully returns.
    • Method Detail

      • acknowledge

        public void acknowledge​(SQSMessage message)
                         throws javax.jms.JMSException
        Acknowledges the consumed message via calling deleteMessage
        Specified by:
        acknowledge in interface Acknowledger
        Parameters:
        message - message to acknowledge.
        Throws:
        javax.jms.JMSException
      • notifyMessageReceived

        public void notifyMessageReceived​(SQSMessage message)
                                   throws javax.jms.JMSException
        When notify message is received, it will acknowledge the message.
        Specified by:
        notifyMessageReceived in interface Acknowledger
        Parameters:
        message - notify acknowledger message is received
        Throws:
        javax.jms.JMSException
      • forgetUnAckMessages

        public void forgetUnAckMessages()
        AutoAcknowledge doesn't need to do anything in this method.
        Specified by:
        forgetUnAckMessages in interface Acknowledger