shibd commented on code in PR #15622:
URL: https://github.com/apache/pulsar/pull/15622#discussion_r1156018535


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java:
##########
@@ -382,23 +384,28 @@ public Optional<Schema<?>> getReaderSchema() {
         if (schema == null) {
             return Optional.empty();
         }
+        byte[] schemaVersion = getSchemaVersion();
+        if (schemaVersion == null) {
+            return Optional.of(schema);

Review Comment:
   This is a breaking change.
   
   If the producer uses `BYTES` schema(It should be all `Primitive` type will 
happen), and the consumer use the `AutoConsumer` schema.
   
   ```
   Schema schema = msg.msg.getReaderSchema().get();
   ```
   
   
   - Before 2.9.3, the schema is `ByteSchema` object.
   - After 2.9.3, the schema is `AutoConsumerSchema` object.
   
   Please let me know if I missed something, thanks.
   
   
   
   



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