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


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java:
##########
@@ -213,6 +212,31 @@ public <K, V> void send(final String topic,
                     keyClass,
                     valueClass),
                 exception);
+        } catch (final SerializationException exception) {
+            final ProducerRecord<K, V> record = new ProducerRecord<>(topic, 
partition, timestamp, key, value, headers);
+            final 
ProductionExceptionHandler.ProductionExceptionHandlerResponse response;
+            try {
+                response = 
productionExceptionHandler.onSerializationException(record, exception);
+            } catch (final Exception e) {
+                log.error("Fatal handling serialization exception on record 
{}", record, e);
+                recordSendError(topic, e, null);
+                return;
+            }
+
+            if (response == ProductionExceptionHandlerResponse.FAIL) {
+                log.error("Fatal handling serialization exception on record 
{}", record, exception);
+                recordSendError(topic, exception, null);
+                return;
+            }
+
+            log.warn("Unable to serialize {}. Continue processing. " +
+                    "ProducerRecord(key=[{}], value=[{}], topic=[{}], 
partition=[{}], timestamp=[{}])",
+                keyBytes == null ? "key" : "value",

Review Comment:
   hmm good point, maybe just log the continue processing message then.



-- 
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