@NonNullApi
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).BackOffHandler Handler for the provided back off time, listener container and exception.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
.BatchInterceptor<K,V> An interceptor for batches of records.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.CommonErrorHandler Replacement forErrorHandler
andBatchErrorHandler
and their sub-interfaces.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.ConsumerAwareMessageListener<K,V> Listener for handling individual incoming Kafka messages.ConsumerAwareRebalanceListener A rebalance listener that provides access to the consumer object.ConsumerAwareRecordInterceptor<K,V> ARecordInterceptor
that has access to theConsumer
.ConsumerAwareRecordRecoverer AConsumerRecordRecoverer
that supports getting a reference to theConsumer
.ConsumerPauseResumeEventPublisher Objects that can publish consumer pause/resume events.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.DeadLetterPublishingRecoverer.ExceptionHeadersCreator Use this to provide a custom implementation to take complete control over exception header creation for the output record.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.KafkaBackOffManagerFactory Creates aKafkaBackOffManagerFactory
instance.KafkaConsumerBackoffManager Interface for backing off aMessageListenerContainer
until a given dueTimestamp, if such timestamp is in the future.KafkaListenerErrorHandler An error handler which is called when a@KafkaListener
method throws an exception.ListenerContainerRegistry A registry for listener containers.ListenerInvokingBatchErrorHandler A batch error handler that is capable of invoking the listener during error handling.ListenerMetadata Metadata associated to aKafkaListener
.ManualAckListenerErrorHandler AKafkaListenerErrorHandler
that supports manual acks.MessageListener<K,V> Listener for handling individual incoming Kafka messages.MessageListenerContainer Internal abstraction used by the framework representing a message listener container.OffsetAndMetadataProvider Provider forOffsetAndMetadata
.RecordInterceptor<K,V> An interceptor forConsumerRecord
invoked by the listener container before and after invoking the listener.RecoveryStrategy Called to determine whether a record should be skipped.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.RetryListener A listener for retry activity.ThreadStateProcessor A general interface for managing thread-bound resources when aConsumer
is available. -
Class Summary Class Description AbstractConsumerSeekAware Manages theConsumerSeekAware.ConsumerSeekCallback
s for the listener.AbstractKafkaBackOffManagerFactory Base class forKafkaBackOffManagerFactory
implementations.AbstractMessageListenerContainer<K,V> The base implementation for theMessageListenerContainer
.CommonContainerStoppingErrorHandler ACommonErrorHandler
that stops the container when an error occurs.CommonDelegatingErrorHandler An error handler that delegates to different error handlers, depending on the exception type.CommonLoggingErrorHandler TheCommonErrorHandler
implementation for logging exceptions.CommonMixedErrorHandler ACommonErrorHandler
that delegates to differentCommonErrorHandler
s for record and batch listeners.CompositeBatchInterceptor<K,V> ABatchInterceptor
that delegates to one or moreBatchInterceptor
s in order.CompositeRecordInterceptor<K,V> ARecordInterceptor
that delegates to one or moreRecordInterceptor
s in order.ConcurrentMessageListenerContainer<K,V> Creates 1 or moreKafkaMessageListenerContainer
s based onconcurrency
.ConsumerProperties Common consumer properties.ContainerGroup A group of listener containers.ContainerGroupSequencer Sequence the starting of container groups when all containers in the previous group are idle.ContainerPartitionPausingBackOffManager A manager that backs off consumption for a given topic if the timestamp provided is not due.ContainerPartitionPausingBackOffManagerFactory A factory forContainerPartitionPausingBackOffManager
.ContainerPausingBackOffHandler ABackOffHandler
that pauses the container for the backoff.ContainerProperties Contains runtime properties for a listener container.DeadLetterPublishingRecoverer AConsumerRecordRecoverer
that publishes a failed record to a dead-letter topic.DeadLetterPublishingRecoverer.HeaderNames Container class for the name of the headers that will be added to the produced record.DeadLetterPublishingRecoverer.HeaderNames.Builder Provides a convenient API for creatingDeadLetterPublishingRecoverer.HeaderNames
.DeadLetterPublishingRecoverer.HeaderNames.ExceptionInfo Header names for exception headers.DeadLetterPublishingRecoverer.HeaderNames.Original Header names for original record property headers.DefaultAfterRollbackProcessor<K,V> Default implementation ofAfterRollbackProcessor
.DefaultBackOffHandler DefaultBackOffHandler
; suspends the thread for the back off.DefaultErrorHandler An error handler that, for record listeners, seeks to the current offset for each topic in the remaining records.ErrorHandlingUtils Utilities for error handling.ExceptionClassifier Supports exception classification.FailedBatchProcessor Subclass ofFailedRecordProcessor
that can process (and recover) a batch.FailedRecordProcessor Common super class for classes that deal with failing to consume a consumer record.KafkaConsumerBackoffManager.Context Provides the state that will be used for backing off.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.ListenerContainerPauseService Service for pausing and resuming ofMessageListenerContainer
.ListenerUtils Listener utilities.LoggingCommitCallback Logs commit results at DEBUG level for success and ERROR for failures.LoggingErrorHandler Deprecated. - use theCommonLoggingErrorHandler
instead.SeekToCurrentBatchErrorHandler Deprecated. with no replacement - useDefaultErrorHandler
with an infiniteBackOff
.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.DeadLetterPublishingRecoverer.HeaderNames.HeadersToAdd Bits representing which headers to add.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.KafkaBackoffException Exception thrown when the consumer should not yet consume the message due to backOff.ListenerExecutionFailedException The listener specificKafkaException
extension.TimestampedException AKafkaException
that records the timestamp of when it was thrown.