philipnee commented on code in PR #13477: URL: https://github.com/apache/kafka/pull/13477#discussion_r1166276780
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java: ########## @@ -213,6 +212,32 @@ 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; + + log.debug("Error serializing record to topic {} due to {}", topic, exception); + + try { + response = productionExceptionHandler.handleSerializationException(record, exception); + } catch (final Exception e) { + log.error("Fatal when handling serialization exception", e); + recordSendError(topic, e, null); + return; + } + + if (response == ProductionExceptionHandlerResponse.FAIL) { + log.error("Fatal due to SerializationException.", exception); + droppedRecordsSensor.record(); + throw exception; + } + + log.warn("Unable to serialize record, continue processing. " + + "ProducerRecord(topic=[{}], partition=[{}], timestamp=[{}])", + topic, + partition, + timestamp); + Review Comment: oh god, thanks for catching this. -- 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