Interface Acknowledgeable

All Known Subinterfaces:
Message<T>

public interface Acknowledgeable
  • Method Details

    • ack

      Acknowledge this object. Generally used to indicate that the message has been processed successfully and can safely be removed from its respective source.

      This method guarantees that the given listener will be called exactly once, with either success or failure.

      This operation is idempotent, meaning that calling it multiple times will have the same effect as calling it once.

      This method is mutually exclusive with nack, meaning that if this method is called, then a subsequent call to the nack method should fail.

      Parameters:
      listener - the listener to notify when the acknowledgement is complete, either successfully or with an error.
    • nack

      Negatively acknowledge this object. Generally used to indicate that there was an error processing the message, and it should be retried according to the semantics of its respective source.

      This method guarantees that the given listener will be called exactly once, with either success or failure.

      This operation is idempotent, meaning that calling it multiple times will have the same effect as calling it once.

      This method is mutually exclusive with ack, meaning that if this method is called, then a subsequent call to the ack method should fail.

      Parameters:
      listener - the listener to notify when the negative acknowledgement is complete, either successfully or with an error.