michaeljmarshall commented on code in PR #20299:
URL: https://github.com/apache/pulsar/pull/20299#discussion_r1197101978
##########
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:
I catch exception in the next part catch block. The difference is just in
the error message.
--
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]