Package org.springframework.kafka.listener
Package for kafka listeners
-
Interface Summary Interface Description AcknowledgingConsumerAwareMessageListener<K,V> Listener for handling incoming Kafka messages, propagating an acknowledgment handle that recipients can invoke when the message has been processed.AcknowledgingMessageListener<K,V> Listener for handling incoming Kafka messages, propagating an acknowledgment handle that recipients can invoke when the message has been processed.AfterRollbackProcessor<K,V> Invoked by a listener container with remaining, unprocessed, records (including the failed record).BatchAcknowledgingConsumerAwareMessageListener<K,V> Listener for handling a batch of incoming Kafka messages, propagating an acknowledgment handle that recipients can invoke when the message has been processed.BatchAcknowledgingMessageListener<K,V> Listener for handling a batch of incoming Kafka messages, propagating an acknowledgment handle that recipients can invoke when the message has been processed.BatchConsumerAwareMessageListener<K,V> Listener for handling a batch of incoming Kafka messages; the list is created from the consumer records object returned by a poll.BatchErrorHandler Handles errors thrown during the execution of aBatchMessageListener
.BatchMessageListener<K,V> Listener for handling a batch of incoming Kafka messages; the list is created from the consumer records object returned by a poll.ConsumerAwareBatchErrorHandler An error handler that has access to the consumer, for example to adjust offsets after an error.ConsumerAwareErrorHandler An error handler that has access to the consumer, for example to adjust offsets after an error.ConsumerAwareListenerErrorHandler An error handler that has access to the consumer, for example to adjust offsets after an error.ConsumerAwareMessageListener<K,V> Listener for handling individual incoming Kafka messages.ConsumerAwareRebalanceListener A rebalance listener that provides access to the consumer object.ConsumerRecordRecoverer ABiConsumer
extension for recovering consumer records.ConsumerSeekAware Listeners that implement this interface are provided with aConsumerSeekAware.ConsumerSeekCallback
which can be used to perform a seek operation.ConsumerSeekAware.ConsumerSeekCallback A callback that a listener can invoke to seek to a specific offset.ContainerAwareBatchErrorHandler An error handler that has access to the batch of records from the last poll the consumer, and the container.ContainerAwareErrorHandler An error handler that has access to the unprocessed records from the last poll (including the failed record), the consumer, and the container.DelegatingMessageListener<T> Classes implementing this interface allow containers to determine the type of the ultimate listener.DeliveryAttemptAware A component implementing this interface can provide the next delivery attempt.ErrorHandler Handles errors thrown during the execution of aMessageListener
.GenericErrorHandler<T> A generic error handler.GenericMessageListener<T> Top level interface for listeners.GenericMessageListenerContainer<K,V> Generic message listener container; adds parameters.KafkaListenerErrorHandler An error handler which is called when a@KafkaListener
method throws an exception.ListenerInvokingBatchErrorHandler A batch error handler that is capable of invoking the listener during error handling.MessageListener<K,V> Listener for handling individual incoming Kafka messages.MessageListenerContainer Internal abstraction used by the framework representing a message listener container.RecordInterceptor<K,V> An interceptor forConsumerRecord
invoked by the listener container before invoking the listener.RemainingRecordsErrorHandler An error handler that has access to the unprocessed records from the last poll (including the failed record) and the consumer, for example to adjust offsets after an error. -
Class Summary Class Description AbstractConsumerSeekAware Manages theConsumerSeekAware.ConsumerSeekCallback
s for the listener.AbstractMessageListenerContainer<K,V> The base implementation for theMessageListenerContainer
.BatchLoggingErrorHandler Simple handler that invokes aLoggingErrorHandler
for each record.CompositeRecordInterceptor<K,V> ARecordInterceptor
that delegates to one or moreRecordInterceptor
in order.ConcurrentMessageListenerContainer<K,V> Creates 1 or moreKafkaMessageListenerContainer
s based onconcurrency
.ConsumerProperties Common consumer properties.ContainerProperties Contains runtime properties for a listener container.ContainerStoppingBatchErrorHandler A container error handler that stops the container after an exception is thrown by the listener.ContainerStoppingErrorHandler A container error handler that stops the container after an exception is thrown by the listener.DeadLetterPublishingRecoverer AConsumerRecordRecoverer
that publishes a failed record to a dead-letter topic.DefaultAfterRollbackProcessor<K,V> Default implementation ofAfterRollbackProcessor
.FailedRecordProcessor Common super class for classes that deal with failing to consume a consumer record.KafkaExceptionLogLevelAware A top level abstract class for classes that can be configured with aKafkaException.Level
.KafkaMessageListenerContainer<K,V> Single-threaded Message listener container using the JavaConsumer
supporting auto-partition assignment or user-configured assignment.ListenerUtils Listener utilities.LoggingCommitCallback Logs commit results at DEBUG level for success and ERROR for failures.LoggingErrorHandler TheErrorHandler
implementation for logging purpose.RecoveringBatchErrorHandler An error handler that seeks to the current offset for each topic in a batch of records.RetryingBatchErrorHandler A batch error handler that invokes the listener according to the suppliedBackOff
.SeekToCurrentBatchErrorHandler An error handler that seeks to the current offset for each topic in a batch of records.SeekToCurrentErrorHandler An error handler that seeks to the current offset for each topic in the remaining records.SeekUtils Seek utilities. -
Enum Summary Enum Description ContainerProperties.AckMode The offset commit behavior enumeration.ContainerProperties.AssignmentCommitOption Offset commit behavior during assignment.ContainerProperties.EOSMode Mode for exactly once semantics.ListenerType Defines the listener type. -
Exception Summary Exception Description BatchListenerFailedException An exception thrown by user code to inform the framework which record in a batch has failed.ListenerExecutionFailedException The listener specificKafkaException
extension.