mjsax commented on code in PR #13477:
URL: https://github.com/apache/kafka/pull/13477#discussion_r1164381176


##########
streams/src/main/java/org/apache/kafka/streams/errors/ProductionExceptionHandler.java:
##########
@@ -34,6 +35,18 @@ public interface ProductionExceptionHandler extends 
Configurable {
     ProductionExceptionHandlerResponse handle(final ProducerRecord<byte[], 
byte[]> record,
                                               final Exception exception);
 
+    /**
+     * Handles serialization exception and determine if the process should 
continue. The default implementation is to
+     * fail the process.
+     *
+     * @param record        the record that failed to serialize
+     * @param exception     the exception that occurred during serialization
+     */
+    default ProductionExceptionHandlerResponse onSerializationException(final 
ProducerRecord record,

Review Comment:
   I think it's correct to have `Exception` as it's more generic. Guess we 
could actually make it a `RuntimeException` but limiting it to 
`SerializationException` might be too restrictive, because the interface of 
`org.apache.kafka.common.serialization.Serializer#serialize` does not declare 
what exception might be throw, so it could be anything?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to