mjsax commented on code in PR #17169:
URL: https://github.com/apache/kafka/pull/17169#discussion_r1755588764
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java:
##########
@@ -282,7 +284,22 @@ public <K, V> void send(final String topic,
topicProducedSensor.record(bytesProduced,
context.currentSystemTimeMs());
}
} else {
- recordSendError(topic, exception, serializedRecord, context,
processorNodeId);
+ final RecordContext recordContext = context.recordContext();
+ recordSendError(
+ topic,
+ exception,
+ serializedRecord,
+ recordContext != null ?
+ new ProcessorRecordContext(
Review Comment:
Given what the callback is executed on the producer sender thread, I think
we need to make a deep copy here. Otherwise, the information inside the
`RecordContext` object might change under the hood.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]