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.
A general abstraction over acknowledgments.
- Since:
- 5.0.1
- Author:
- Gary Russell
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault voidAcknowledge the message delivery.voidAcknowledge the message.default booleanImplementations must implement this to indicate when the ack has been processed by the user so that the framework can auto-ack if needed.default booleanReturn true if this acknowledgment supports auto ack when it has not been already ack'd by the application.default voidDisable 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.
-