Denovo1998 commented on code in PR #17449:
URL: https://github.com/apache/pulsar/pull/17449#discussion_r1058842583


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AutoConsumeSchema.java:
##########
@@ -140,7 +150,7 @@ public void setSchemaInfoProvider(SchemaInfoProvider 
schemaInfoProvider) {
     @Override
     public SchemaInfo getSchemaInfo() {
         if (!schemaMap.containsKey(SchemaVersion.Latest)) {
-            return null;
+            return SCHEMA_INFO;

Review Comment:
   So here it looks like this. If AUTO_CONSUME consumer is used to subscribe to 
a topic, and the topic has no schema, the schemaMap in AutoConsumeSchema will 
have no key for SchemaVersion.Latest. Then do getSchemaInfo, schemainfo is 
null. There is no way to upload the AUTO_CONSUNE to the broker. So in the 
previous commit, if (si == null && schema instanceof AutoConsumeSchema), I 
create a schemainfo with a schemaType of AUTO_CONSUME. What am I supposed to do 
here? Do not change getSchemaInfo, still use the previous code?



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