Class KafkaMessageSource.KafkaAckCallback<K,V> 
java.lang.Object
org.springframework.integration.kafka.inbound.KafkaMessageSource.KafkaAckCallback<K,V> 
- Type Parameters:
- K- the key type.
- V- the value type.
- All Implemented Interfaces:
- AcknowledgmentCallback,- SimpleAcknowledgment,- org.springframework.kafka.support.Acknowledgment
- Enclosing class:
- KafkaMessageSource<K,- V> 
public static class KafkaMessageSource.KafkaAckCallback<K,V> 
extends Object
implements AcknowledgmentCallback, org.springframework.kafka.support.Acknowledgment
AcknowledgmentCallback for Kafka.
- Since:
- 5.4
- Author:
- Gary Russell, Mark Norkin, Artem Bilan, Anshul Mehra, Christian Tzolov, Ngoc Nhan
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.integration.acks.AcknowledgmentCallbackAcknowledgmentCallback.Status
- 
Constructor SummaryConstructorsConstructorDescriptionKafkaAckCallback(KafkaMessageSource.KafkaAckInfo<K, V> ackInfo, org.springframework.kafka.listener.ConsumerProperties consumerProperties) Construct an instance with the provided properties.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAcknowledge the message delivery.voidAcknowledge the message.booleanImplementations must implement this to indicate when the ack has been processed by the user so that the framework can auto-ack if needed.booleanReturn true if this acknowledgment supports auto ack when it has not been already ack'd by the application.voidDisable auto acknowledgment by aSourcePollingChannelAdapterorMessageSourcePollingTemplate.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.kafka.support.Acknowledgmentacknowledge, isOutOfOrderCommit, nack, nack
- 
Constructor Details- 
KafkaAckCallbackpublic KafkaAckCallback(KafkaMessageSource.KafkaAckInfo<K, V> ackInfo, @Nullable org.springframework.kafka.listener.ConsumerProperties consumerProperties) Construct an instance with the provided properties.- Parameters:
- ackInfo- the ack info.
- consumerProperties- the consumer properties - only commit-related properties are used.
 
 
- 
- 
Method Details- 
acknowledgeDescription copied from interface:AcknowledgmentCallbackAcknowledge the message.- Specified by:
- acknowledgein interface- AcknowledgmentCallback
- Parameters:
- status- the status.
 
- 
isAcknowledgedpublic boolean isAcknowledged()Description copied from interface:AcknowledgmentCallbackImplementations must implement this to indicate when the ack has been processed by the user so that the framework can auto-ack if needed.- Specified by:
- isAcknowledgedin interface- AcknowledgmentCallback
- Returns:
- true if the message is already acknowledged.
 
- 
acknowledgepublic void acknowledge()Description copied from interface:SimpleAcknowledgmentAcknowledge the message delivery.- Specified by:
- acknowledgein interface- org.springframework.kafka.support.Acknowledgment
- Specified by:
- acknowledgein interface- AcknowledgmentCallback
- Specified by:
- acknowledgein interface- SimpleAcknowledgment
 
- 
noAutoAckpublic void noAutoAck()Description copied from interface:AcknowledgmentCallbackDisable auto acknowledgment by aSourcePollingChannelAdapterorMessageSourcePollingTemplate. Not all implementations support this - for example, the Kafka message source.- Specified by:
- noAutoAckin interface- AcknowledgmentCallback
 
- 
isAutoAckpublic boolean isAutoAck()Description copied from interface:AcknowledgmentCallbackReturn true if this acknowledgment supports auto ack when it has not been already ack'd by the application.- Specified by:
- isAutoAckin interface- AcknowledgmentCallback
- Returns:
- true if auto ack is supported.
 
 
-