liangyepianzhou commented on code in PR #19767:
URL: https://github.com/apache/pulsar/pull/19767#discussion_r1141692582


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java:
##########
@@ -350,7 +352,12 @@ public <T> CompletableFuture<Producer<T>> 
createProducerAsync(ProducerConfigurat
             return lookup.getSchema(TopicName.get(conf.getTopicName()))
                     .thenCompose(schemaInfoOptional -> {
                         if (schemaInfoOptional.isPresent()) {
-                            
autoProduceBytesSchema.setSchema(Schema.getSchema(schemaInfoOptional.get()));
+                            SchemaInfo schemaInfo = schemaInfoOptional.get();
+                            if (schemaInfo.getType() == SchemaType.PROTOBUF) {
+                                autoProduceBytesSchema.setSchema(new 
GenericAvroSchema(schemaInfo));

Review Comment:
   The Auto_ConsumerSchema can not support `PROTOBUF`.



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