congbobo184 commented on code in PR #17449:
URL: https://github.com/apache/pulsar/pull/17449#discussion_r1045395835
##########
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:
if the client consumer sub with Schema.Type AUTO_CONSUME, the sub command
arrived at the broker, the schema is null. we don't need to check this, because
schema.getType() != SchemaType.AUTO_CONSUME always true
--
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]