babubabu commented on code in PR #9604:
URL: https://github.com/apache/nifi/pull/9604#discussion_r1902062339


##########
nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/kafka/processors/producer/convert/RecordWrapperStreamKafkaRecordConverter.java:
##########
@@ -107,7 +107,10 @@ public KafkaRecord next() {
                     final RecordFieldConverter converter = new 
RecordFieldConverter(record, flowFile, logger);
                     final byte[] key = converter.toBytes(WrapperRecord.KEY, 
keyWriterFactory);
                     final byte[] value = 
converter.toBytes(WrapperRecord.VALUE, writerFactory);
-                    ProducerUtils.checkMessageSize(maxMessageSize, 
value.length);
+
+                    if (value != null) {

Review Comment:
   Are you sure to depend a tombstone produce on both value=null and the 
flowfile attribute? I know, on the one hand, the attribute is a part of the 
"contract" of the nifi-kafka-interface, but on the other hand as a user, I 
would not assume to also set the flowfile attribute after adjusting the content 
to wrapper structure (e.g. jolt-transfom or others). Additionally, we can keep 
the code cleaner ;-)
   I would follow your intention in this point. If you want to, I'll add the 
dependency!



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

Reply via email to