THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- A public enumeration,
ProductionExceptionHandlerResponse
, with two possible values:CONTINUE
andFAIL
- A public interface named
ProductionExceptionHandler
with a single method,handle
, that has the following signature:ProductionExceptionHandlerResponse handle(ProducerRecord<byte[], byte[]> record, Exception exception)
- One default implementation of ProductionExceptionHandler
- The
AlwaysFailProductionExceptionHandler
DefaultProductionExceptionHandler
, the default implementation that maintains the current behavior of always failing when production exceptions occur.
- The
- A new configuration parameter for Streams named
default.production.exception.handler
that accepts the fully qualified class name of theProductionExceptionHandler
to use.
...
This implementation will modify the KafkaStreams
constructor to create a ProductionExceptionHandler
from the aforementioned config value, defaulting to a default implementation that always re-throws the error (the AlwaysFailProductionExceptionHandler
DefaultProductionExceptionHandler
mentioned above). We'll pipe this processor through the StreamThread
/StreamTask
into RecordCollectorImpl
.
...