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:
org.springframework.integration.acks.AcknowledgmentCallback,org.springframework.integration.acks.SimpleAcknowledgment,org.springframework.kafka.support.Acknowledgment
- Enclosing class:
- KafkaMessageSource<K,
V>
public static class KafkaMessageSource.KafkaAckCallback<K,V>
extends Object
implements org.springframework.integration.acks.AcknowledgmentCallback, org.springframework.kafka.support.Acknowledgment
AcknowledgmentCallback for Kafka.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.acks.AcknowledgmentCallback
org.springframework.integration.acks.AcknowledgmentCallback.Status -
Constructor Summary
ConstructorsConstructorDescriptionKafkaAckCallback(KafkaMessageSource.KafkaAckInfo<K, V> ackInfo, org.springframework.kafka.listener.ConsumerProperties consumerProperties) Construct an instance with the provided properties. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidacknowledge(org.springframework.integration.acks.AcknowledgmentCallback.Status status) booleanbooleanvoidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.kafka.support.Acknowledgment
nack, nack
-
Constructor Details
-
KafkaAckCallback
public 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
-
acknowledge
public void acknowledge(org.springframework.integration.acks.AcknowledgmentCallback.Status status) - Specified by:
acknowledgein interfaceorg.springframework.integration.acks.AcknowledgmentCallback
-
isAcknowledged
public boolean isAcknowledged()- Specified by:
isAcknowledgedin interfaceorg.springframework.integration.acks.AcknowledgmentCallback
-
acknowledge
public void acknowledge()- Specified by:
acknowledgein interfaceorg.springframework.kafka.support.Acknowledgment- Specified by:
acknowledgein interfaceorg.springframework.integration.acks.AcknowledgmentCallback- Specified by:
acknowledgein interfaceorg.springframework.integration.acks.SimpleAcknowledgment
-
noAutoAck
public void noAutoAck()- Specified by:
noAutoAckin interfaceorg.springframework.integration.acks.AcknowledgmentCallback
-
isAutoAck
public boolean isAutoAck()- Specified by:
isAutoAckin interfaceorg.springframework.integration.acks.AcknowledgmentCallback
-