K - the key type.V - the value type.public static class KafkaMessageSource.KafkaAckCallback<K,V> extends Object implements AcknowledgmentCallback, org.springframework.kafka.support.Acknowledgment
AcknowledgmentCallback.Status| Constructor and Description |
|---|
KafkaAckCallback(KafkaMessageSource.KafkaAckInfo<K,V> ackInfo,
org.springframework.kafka.listener.ConsumerProperties consumerProperties)
Construct an instance with the provided properties.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge()
Acknowledge the message delivery.
|
void |
acknowledge(AcknowledgmentCallback.Status status)
Acknowledge the message.
|
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.
|
boolean |
isAutoAck()
Return true if this acknowledgment supports auto ack when it has not been
already ack'd by the application.
|
void |
noAutoAck()
Disable auto acknowledgment by a
SourcePollingChannelAdapter
or MessageSourcePollingTemplate. |
public KafkaAckCallback(KafkaMessageSource.KafkaAckInfo<K,V> ackInfo, @Nullable org.springframework.kafka.listener.ConsumerProperties consumerProperties)
ackInfo - the ack info.consumerProperties - the consumer properties - only commit-related
properties are used.public void acknowledge(AcknowledgmentCallback.Status status)
AcknowledgmentCallbackacknowledge in interface AcknowledgmentCallbackstatus - the status.public boolean isAcknowledged()
AcknowledgmentCallbackisAcknowledged in interface AcknowledgmentCallbackpublic void acknowledge()
SimpleAcknowledgmentacknowledge in interface AcknowledgmentCallbackacknowledge in interface SimpleAcknowledgmentacknowledge in interface org.springframework.kafka.support.Acknowledgmentpublic void noAutoAck()
AcknowledgmentCallbackSourcePollingChannelAdapter
or MessageSourcePollingTemplate. Not all implementations support
this - for example, the Kafka message source.noAutoAck in interface AcknowledgmentCallbackpublic boolean isAutoAck()
AcknowledgmentCallbackisAutoAck in interface AcknowledgmentCallback