gaoran10 commented on a change in pull request #10604:
URL: https://github.com/apache/pulsar/pull/10604#discussion_r633463546



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AutoConsumeSchema.java
##########
@@ -43,73 +44,82 @@
 @Slf4j
 public class AutoConsumeSchema implements Schema<GenericRecord> {
 
-    private Schema<?> schema;
+    private final Map<SchemaVersion, Schema<?>> schemaMap = new HashMap<>();
 
     private String topicName;
 
     private String componentName;
 
     private SchemaInfoProvider schemaInfoProvider;
 
+    public AutoConsumeSchema() {
+        schemaMap.put(BytesSchemaVersion.of(new byte[0]), Schema.BYTES);

Review comment:
       The `Schema.BYTES` will not be uploaded to the broker and store in the 
schema storage, if the schema version in the message metadata is empty byte[], 
it means its schema is `Schema.BYTES`. I'll add this in the `schemaMap` init 
method and add a comment.




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