rk3rn3r commented on a change in pull request #1052:
URL:
https://github.com/apache/camel-kafka-connector/pull/1052#discussion_r581189826
##########
File path: core/src/main/java/org/apache/camel/kafkaconnector/CamelSinkTask.java
##########
@@ -175,8 +180,8 @@ public void put(Collection<SinkRecord> sinkRecords) {
TaskHelper.logRecordContent(LOG, loggingLevel, record);
Exchange exchange = new
DefaultExchange(producer.getCamelContext());
- exchange.getMessage().setBody(record.value());
- exchange.getMessage().setHeader(KAFKA_RECORD_KEY_HEADER,
record.key());
+
exchange.getMessage().setBody(convertValueFromStruct(record.valueSchema(),
record.value()));
Review comment:
Is this safe for NPEs on NULL-records which can arrive from SMTs under
certain conditions?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]