Interface KafkaStreamsDeadLetterDestinationResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface for resolving the dead-letter topic destination of a failed record handled by
either
RecoveringDeserializationExceptionHandler,
RecoveringProcessingExceptionHandler, or RecoveringProductionExceptionHandler
through the native Kafka Streams DLQ.- Since:
- 4.1
- Author:
- Loïc Greffier
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.kafka.common.TopicPartitionresolve(org.apache.kafka.streams.errors.ErrorHandlerContext errorHandlerContext, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, Exception exception) Resolves the topic-partition to which a dead-letter record should be sent.
-
Method Details
-
resolve
org.apache.kafka.common.TopicPartition resolve(org.apache.kafka.streams.errors.ErrorHandlerContext errorHandlerContext, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, Exception exception) Resolves the topic-partition to which a dead-letter record should be sent. Use a negative partition number to let the partitioner determine the partition.- Parameters:
errorHandlerContext- the error handler contextrecord- the input record of the failed processorexception- the exception- Returns:
- the topic-partition to which the failed record should be sent
-