dlg99 commented on a change in pull request #9825:
URL: https://github.com/apache/pulsar/pull/9825#discussion_r589679454



##########
File path: 
pulsar-io/kafka/src/main/java/org/apache/pulsar/io/kafka/KafkaBytesSink.java
##########
@@ -54,4 +55,11 @@ protected Properties beforeCreateProducer(Properties props) {
     public KeyValue<String, byte[]> extractKeyValue(Record<byte[]> record) {
         return new KeyValue<>(record.getKey().orElse(null), record.getValue());
     }
+
+    @Override
+    public KeyValue<Schema, Schema> extractKeyValueSchemas(Record<byte[]> 
record) {
+        Schema keySchema = Schema.STRING_SCHEMA;

Review comment:
       @sijie This is a type of original key (always String in pulsar).
   KafkaProducer does serialization on send with configured serializers.
   KafkaSinkWrappingProducer simply passes the key and value as it is to the 
sink, so the String key is passed as a String. 




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


Reply via email to