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
-
Method Summary
Modifier and TypeMethodDescriptiondefault 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 aSourcePollingChannelAdapter
orMessageSourcePollingTemplate
.
-
Method Details
-
acknowledge
Acknowledge the message.- Parameters:
status
- the status.
-
acknowledge
default void acknowledge()Description copied from interface:SimpleAcknowledgment
Acknowledge the message delivery.- Specified by:
acknowledge
in 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 aSourcePollingChannelAdapter
orMessageSourcePollingTemplate
. 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.
-