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


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -811,6 +812,11 @@ public void connectionOpened(final ClientCnx cnx) {
         if (si != null && (SchemaType.BYTES == si.getType() || SchemaType.NONE 
== si.getType())) {
             // don't set schema for Schema.BYTES
             si = null;
+        } else {
+            if (schema instanceof AutoConsumeSchema
+                    && 
Commands.peerSupportsCarryAutoConsumeSchemaToBroker(cnx.getRemoteEndpointProtocolVersion()))
 {

Review Comment:
   Yes, yes, but you can look at it.
   `SchemaInfo si = schema.getSchemaInfo();`
   And
   
https://github.com/apache/pulsar/blob/06e4db5c821b2ba9241040f5db52f882e83e8cd8/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AutoConsumeSchema.java#L140-L146
   So `getAutoConsumeSchemaInfo` is executed when si is null.



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