You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/12/12 14:56:48 UTC

[GitHub] [pulsar] Denovo1998 commented on a diff in pull request #17449: [fix][broker]Fix using schema to create consumer fails after using AUTO_CONSUME consumer to subscribe topic

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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1113,11 +1113,12 @@ protected void handleSubscribe(final CommandSubscribe subscribe) {
                                     .subscriptionProperties(subscriptionProperties)
                                     .consumerEpoch(consumerEpoch)
                                     .build();
-                            if (schema != null) {
-                                return topic.addSchemaIfIdleOrCheckCompatible(schema)
-                                        .thenCompose(v -> topic.subscribe(option));
+                            if (schema != null && schema.getType() != SchemaType.AUTO_PUBLISH
+                                    && schema.getType() != SchemaType.AUTO_CONSUME) {

Review Comment:
   Already fixed.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org