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


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -814,6 +815,10 @@ 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) {
+                si = ((AutoConsumeSchema) schema).getAutoConsumeSchemaInfo();

Review Comment:
   Instead of adding a `getAutoConsumerSchemaInfo` method, I think we can just 
create the `SchemaInfo` here.
   
   ```java
               si = SchemaInfo.builder()
                       .name("AutoConsume")
                       .type(SchemaType.AUTO_CONSUME)
                       .schema(new byte[0])
                       .build();
   ```



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