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 classAcknowledgmentCallback.Status -
Method Summary
Modifier and Type Method Description default voidacknowledge()Acknowledge the message delivery.voidacknowledge(AcknowledgmentCallback.Status status)Acknowledge the message.default booleanisAcknowledged()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 booleanisAutoAck()Return true if this acknowledgment supports auto ack when it has not been already ack'd by the application.default voidnoAutoAck()Disable auto acknowledgment by aSourcePollingChannelAdapterorMessageSourcePollingTemplate.
-
Method Details
-
acknowledge
Acknowledge the message.- Parameters:
status- the status.
-
acknowledge
default void acknowledge()Description copied from interface:SimpleAcknowledgmentAcknowledge the message delivery.- Specified by:
acknowledgein interfaceSimpleAcknowledgment
-
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 aSourcePollingChannelAdapterorMessageSourcePollingTemplate. 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.
-