michaeljmarshall commented on code in PR #20299:
URL: https://github.com/apache/pulsar/pull/20299#discussion_r1197391203


##########
pulsar-websocket/src/main/java/org/apache/pulsar/websocket/ConsumerHandler.java:
##########
@@ -467,8 +470,21 @@ protected ConsumerBuilder<byte[]> 
getConsumerConfiguration(PulsarClient client)
 
     @Override
     protected Boolean isAuthorized(String authRole, AuthenticationDataSource 
authenticationData) throws Exception {
-        return service.getAuthorizationService().canConsume(topic, authRole, 
authenticationData,
-                this.subscription);
+        try {
+            AuthenticationDataSubscription subscription = new 
AuthenticationDataSubscription(authenticationData,
+                    this.subscription);
+            return service.getAuthorizationService()
+                    .allowTopicOperationAsync(topic, TopicOperation.CONSUME, 
authRole, subscription)
+                    
.get(service.getConfig().getMetadataStoreOperationTimeoutSeconds(), SECONDS);
+        } catch (InterruptedException e) {

Review Comment:
   PR to clean up the error: https://github.com/apache/pulsar/pull/20349



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