public class SendToDlqAndContinue extends Object implements org.apache.kafka.streams.errors.DeserializationExceptionHandler
DeserializationExceptionHandler that sends the records
in error to a DLQ topic, then continue stream processing on new records.| Modifier and Type | Field and Description |
|---|---|
static String |
KAFKA_STREAMS_DLQ_DISPATCHERS
Key used for DLQ dispatchers.
|
| Constructor and Description |
|---|
SendToDlqAndContinue() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Map<String,?> configs) |
org.apache.kafka.streams.errors.DeserializationExceptionHandler.DeserializationHandlerResponse |
handle(org.apache.kafka.streams.processor.ProcessorContext context,
org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> record,
Exception exception) |
void |
sendToDlq(String topic,
byte[] key,
byte[] value,
int partition)
For a given topic, send the key/value record to DLQ topic.
|
public static final String KAFKA_STREAMS_DLQ_DISPATCHERS
public void sendToDlq(String topic, byte[] key, byte[] value, int partition)
topic - incoming topic that caused the errorkey - to sendvalue - to sendpartition - for the topic where this record should be sentpublic org.apache.kafka.streams.errors.DeserializationExceptionHandler.DeserializationHandlerResponse handle(org.apache.kafka.streams.processor.ProcessorContext context,
org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> record,
Exception exception)
handle in interface org.apache.kafka.streams.errors.DeserializationExceptionHandlerCopyright © 2019 Pivotal Software, Inc.. All rights reserved.