Class KafkaErrorSendingMessageRecoverer
java.lang.Object
org.springframework.integration.core.ErrorMessagePublisher
org.springframework.integration.kafka.inbound.KafkaErrorSendingMessageRecoverer
- All Implemented Interfaces:
BiConsumer<org.apache.kafka.clients.consumer.ConsumerRecord<?,
,?>, Exception> Aware
,BeanFactoryAware
,org.springframework.kafka.listener.ConsumerRecordRecoverer
public class KafkaErrorSendingMessageRecoverer
extends ErrorMessagePublisher
implements org.springframework.kafka.listener.ConsumerRecordRecoverer
An extension of
ErrorMessagePublisher
that can be used in a
CommonErrorHandler
for recovering Kafka
delivery failures.- Since:
- 6.0
- Author:
- Gary Russell
-
Field Summary
Fields inherited from class org.springframework.integration.core.ErrorMessagePublisher
logger, messagingTemplate
-
Constructor Summary
ConstructorDescriptionConstruct an instance to send to the channel with theRawRecordHeaderErrorMessageStrategy
.KafkaErrorSendingMessageRecoverer
(MessageChannel channel, ErrorMessageStrategy errorMessageStrategy) Construct an instance to send the channel, using the error message strategy. -
Method Summary
Methods inherited from class org.springframework.integration.core.ErrorMessagePublisher
determinePayload, getChannel, getChannelResolver, getErrorMessageStrategy, getMessagingTemplate, payloadWhenNull, publish, publish, publish, publish, publish, setBeanFactory, setChannel, setChannelName, setChannelResolver, setErrorMessageStrategy, setSendTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiConsumer
andThen
-
Constructor Details
-
KafkaErrorSendingMessageRecoverer
Construct an instance to send to the channel with theRawRecordHeaderErrorMessageStrategy
.- Parameters:
channel
- the channel.
-
KafkaErrorSendingMessageRecoverer
public KafkaErrorSendingMessageRecoverer(MessageChannel channel, ErrorMessageStrategy errorMessageStrategy) Construct an instance to send the channel, using the error message strategy.- Parameters:
channel
- the channel.errorMessageStrategy
- the strategy.
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceBiConsumer<org.apache.kafka.clients.consumer.ConsumerRecord<?,
?>, Exception>
-