lhotari commented on code in PR #23954:
URL: https://github.com/apache/pulsar/pull/23954#discussion_r2056464981


##########
pulsar-io/kafka/src/main/java/org/apache/pulsar/io/kafka/KafkaBytesSource.java:
##########
@@ -230,25 +271,31 @@ public BytesWithKafkaSchema deserialize(String topic, 
byte[] payload) {
                     ByteBuffer buffer = ByteBuffer.wrap(payload);
                     buffer.get(); // magic number
                     int id = buffer.getInt();
-                    return new BytesWithKafkaSchema(buffer, id);
+                    // the kafka protobuf serializer encodes the 
MessageIndexes in the payload, we need to skip them
+                    if (schemaType == SchemaType.PROTOBUF_NATIVE) {
+                        MessageIndexes.readFrom(buffer);
+                    }

Review Comment:
   Once the license issue is resolved, we could come back to this detail. If 
the code for KafkaProtobufDeserializer would be Apache 2.0 licensed, we could 
rather safely look at the code and see how the proper schema resolution can be 
handled for protobuf encoded messages. As long as we have the license issue, we 
better not copy-paste code due to IPR violation risk.



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to