Interface AcknowledgmentCallback

All Superinterfaces:
SimpleAcknowledgment
All Known Implementing Classes:
AmqpMessageSource.AmqpAckCallback, KafkaMessageSource.KafkaAckCallback
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AcknowledgmentCallback extends SimpleAcknowledgment
A general abstraction over acknowledgments.
Since:
5.0.1
Author:
Gary Russell
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Acknowledge the message delivery.
    void
    Acknowledge the message.
    default boolean
    Implementations must implement this to indicate when the ack has been processed by the user so that the framework can auto-ack if needed.
    default boolean
    Return true if this acknowledgment supports auto ack when it has not been already ack'd by the application.
    default void
    Disable auto acknowledgment by a SourcePollingChannelAdapter or MessageSourcePollingTemplate.
  • Method Details

    • acknowledge

      void acknowledge(AcknowledgmentCallback.Status status)
      Acknowledge the message.
      Parameters:
      status - the status.
    • acknowledge

      default void acknowledge()
      Description copied from interface: SimpleAcknowledgment
      Acknowledge the message delivery.
      Specified by:
      acknowledge in interface SimpleAcknowledgment
    • isAcknowledged

      default boolean isAcknowledged()
      Implementations must implement this to indicate when the ack has been processed by the user so that the framework can auto-ack if needed.
      Returns:
      true if the message is already acknowledged.
    • noAutoAck

      default void noAutoAck()
      Disable auto acknowledgment by a SourcePollingChannelAdapter or MessageSourcePollingTemplate. Not all implementations support this - for example, the Kafka message source.
    • isAutoAck

      default boolean isAutoAck()
      Return true if this acknowledgment supports auto ack when it has not been already ack'd by the application.
      Returns:
      true if auto ack is supported.