codelipenghui commented on code in PR #22773: URL: https://github.com/apache/pulsar/pull/22773#discussion_r1621537433
########## pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java: ########## @@ -256,6 +256,11 @@ private CompletableFuture<PartitionedTopicMetadata> getPartitionedTopicMetadata( CompletableFuture<PartitionedTopicMetadata> partitionFuture = new CompletableFuture<>(); client.getCnxPool().getConnection(socketAddress).thenAccept(clientCnx -> { + if (!metadataAutoCreationEnabled && !clientCnx.isSupportsGetPartitionedMetadataWithoutAutoCreation()) { + partitionFuture.completeExceptionally(new PulsarClientException.NotSupportedException("The broker" + + " version is too old to support getting partitions without auto-creation")); Review Comment: It's better to use ``` The feature of getting partitions without auto-creation is not supported from the broker, please upgrade the broker to the latest version. ``` -- 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-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org