kamalcph commented on code in PR #22774:
URL: https://github.com/apache/kafka/pull/22774#discussion_r3538133290


##########
storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/ProducerManager.java:
##########
@@ -80,15 +98,47 @@ CompletableFuture<RecordMetadata> 
publishMessage(RemoteLogMetadata remoteLogMeta
                     future.complete(metadata);
                 }
             };
-            producer.send(new 
ProducerRecord<>(rlmmConfig.remoteLogMetadataTopicName(), metadataPartitionNum, 
null,
-                                               
serde.serialize(remoteLogMetadata)), callback);
+            String topic = rlmmConfig.remoteLogMetadataTopicName();
+            byte[] serializedKey = keySerde.serializer().serialize(topic, 
remoteLogMetadata.metadataKey());
+            byte[] serializedValue = serde.serialize(remoteLogMetadata);
+            producer.send(new ProducerRecord<>(topic, metadataPartitionNum, 
serializedKey, serializedValue), callback);

Review Comment:
   The RemotePartitionDeleteMetadata and RemoteLogSegmentMetadataSnapshot is 
unused so leaving them with `null` value for metadataKey.



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