poorbarcode commented on code in PR #22283:
URL: https://github.com/apache/pulsar/pull/22283#discussion_r1535112803


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1224,12 +1224,22 @@ protected void handleSubscribe(final CommandSubscribe 
subscribe) {
                         commandSender.sendErrorResponse(requestId, 
ServerError.ServiceNotReady,
                                 "Consumer is already present on the 
connection");
                     } else if 
(existingConsumerFuture.isCompletedExceptionally()){
+                        log.warn("[{}][{}][{}] A failed consumer with id is 
already present on the connection,"
+                                + " consumerId={}", remoteAddress, topicName, 
subscriptionName, consumerId);
                         ServerError error = 
getErrorCodeWithErrorLog(existingConsumerFuture, true,
-                                String.format("Consumer subscribe failure. 
remoteAddress: %s, subscription: %s",
+                                String.format("A failed consumer with id is 
already present on the connection."
+                                                + " remoteAddress: %s, 
subscription: %s",
                                         remoteAddress, subscriptionName));
-                        consumers.remove(consumerId, existingConsumerFuture);
+                        /**
+                         * This feature may was failed due to the client 
closed a in-progress subscribing.

Review Comment:
   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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to