Uses of Interface
org.springframework.kafka.core.KafkaOperations
Packages that use KafkaOperations
Package
Description
Package for kafka core components
Package for kafka listeners
Provides classes for request/reply semantics.
Package for retryable topic handling.
-
Uses of KafkaOperations in org.springframework.kafka.core
Classes in org.springframework.kafka.core that implement KafkaOperationsModifier and TypeClassDescriptionclassKafkaTemplate<K,V> A template for executing high-level operations.classAKafkaTemplatethat routes messages based on the topic name.Methods in org.springframework.kafka.core with parameters of type KafkaOperationsModifier and TypeMethodDescriptionKafkaOperations.OperationsCallback.doInOperations(KafkaOperations<K, V> operations) -
Uses of KafkaOperations in org.springframework.kafka.listener
Methods in org.springframework.kafka.listener with parameters of type KafkaOperationsModifier and TypeMethodDescriptionprotected DurationDeadLetterPublishingRecoverer.determineSendTimeout(KafkaOperations<?, ?> template) Determine the send timeout based on the template's producer factory andDeadLetterPublishingRecoverer.setWaitForSendResultTimeout(Duration).protected voidDeadLetterPublishingRecoverer.publish(org.apache.kafka.clients.producer.ProducerRecord<Object, Object> outRecord, KafkaOperations<Object, Object> kafkaTemplate, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> inRecord) Override this if you want more than just logging of the send result.protected voidDeadLetterPublishingRecoverer.send(org.apache.kafka.clients.producer.ProducerRecord<Object, Object> outRecord, KafkaOperations<Object, Object> kafkaTemplate, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> inRecord) Send the record.protected voidDeadLetterPublishingRecoverer.verifySendResult(KafkaOperations<Object, Object> kafkaTemplate, org.apache.kafka.clients.producer.ProducerRecord<Object, Object> outRecord, CompletableFuture<SendResult<Object, Object>> sendResult, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> inRecord) Wait for the send future to complete.Constructors in org.springframework.kafka.listener with parameters of type KafkaOperationsModifierConstructorDescriptionDeadLetterPublishingRecoverer(KafkaOperations<? extends Object, ? extends Object> template) Create an instance with the provided template and a default destination resolving function that returns a TopicPartition based on the original topic (appended with ".DLT") from the failed record, and the same partition as the failed record.DeadLetterPublishingRecoverer(KafkaOperations<? extends Object, ? extends Object> template, BiFunction<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>, Exception, org.apache.kafka.common.TopicPartition> destinationResolver) Create an instance with the provided template and destination resolving function, that receives the failed consumer record and the exception and returns aTopicPartition.DefaultAfterRollbackProcessor(BiConsumer<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>, Exception> recoverer, BackOff backOff, KafkaOperations<?, ?> kafkaOperations, boolean commitRecovered) Construct an instance with the provided recoverer which will be called after the backOff returns STOP for a topic/partition/offset.DefaultAfterRollbackProcessor(BiConsumer<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>, Exception> recoverer, BackOff backOff, BackOffHandler backOffHandler, KafkaOperations<?, ?> kafkaOperations, boolean commitRecovered) Construct an instance with the provided recoverer which will be called after the backOff returns STOP for a topic/partition/offset.Constructor parameters in org.springframework.kafka.listener with type arguments of type KafkaOperationsModifierConstructorDescriptionDeadLetterPublishingRecoverer(Function<org.apache.kafka.clients.producer.ProducerRecord<?, ?>, KafkaOperations<?, ?>> templateResolver, boolean transactional, BiFunction<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>, Exception, org.apache.kafka.common.TopicPartition> destinationResolver) Create an instance with a template resolving function that receives the failed consumer record and the exception and returns aKafkaOperationsand a flag on whether or not the publishing from this instance will be transactional or not.DeadLetterPublishingRecoverer(Map<Class<?>, KafkaOperations<? extends Object, ? extends Object>> templates) Create an instance with the provided templates and a default destination resolving function that returns a TopicPartition based on the original topic (appended with ".DLT") from the failed record, and the same partition as the failed record.DeadLetterPublishingRecoverer(Map<Class<?>, KafkaOperations<? extends Object, ? extends Object>> templates, BiFunction<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>, Exception, org.apache.kafka.common.TopicPartition> destinationResolver) Create an instance with the provided templates and destination resolving function, that receives the failed consumer record and the exception and returns aTopicPartition. -
Uses of KafkaOperations in org.springframework.kafka.requestreply
Classes in org.springframework.kafka.requestreply that implement KafkaOperationsModifier and TypeClassDescriptionclassA replying template that aggregates multiple replies with the same correlation id.classReplyingKafkaTemplate<K,V, R> A KafkaTemplate that implements request/reply semantics. -
Uses of KafkaOperations in org.springframework.kafka.retrytopic
Methods in org.springframework.kafka.retrytopic that return KafkaOperationsMethods in org.springframework.kafka.retrytopic with parameters of type KafkaOperationsModifier and TypeMethodDescriptionRetryTopicConfigurationBuilder.create(KafkaOperations<?, ?> sendToTopicKafkaTemplate) Create theRetryTopicConfigurationwith the provided template.Constructors in org.springframework.kafka.retrytopic with parameters of type KafkaOperationsModifierConstructorDescriptionDestinationTopicPropertiesFactory(String retryTopicSuffix, String dltSuffix, List<Long> backOffValues, org.springframework.classify.BinaryExceptionClassifier exceptionClassifier, int numPartitions, KafkaOperations<?, ?> kafkaOperations, FixedDelayStrategy fixedDelayStrategy, DltStrategy dltStrategy, TopicSuffixingStrategy topicSuffixingStrategy, long timeout) Properties(long delayMs, String suffix, org.springframework.kafka.retrytopic.DestinationTopic.Type type, int maxAttempts, int numPartitions, DltStrategy dltStrategy, KafkaOperations<?, ?> kafkaOperations, BiPredicate<Integer, Throwable> shouldRetryOn, long timeout) Create an instance with the provided properties with the DLT container starting automatically (if the container factory is so configured).Properties(long delayMs, String suffix, org.springframework.kafka.retrytopic.DestinationTopic.Type type, int maxAttempts, int numPartitions, DltStrategy dltStrategy, KafkaOperations<?, ?> kafkaOperations, BiPredicate<Integer, Throwable> shouldRetryOn, long timeout, Boolean autoStartDltHandler) Create an instance with the provided properties.