lhotari commented on code in PR #24920:
URL: https://github.com/apache/pulsar/pull/24920#discussion_r2486114053
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherSingleActiveConsumer.java:
##########
@@ -225,6 +226,25 @@ public synchronized CompletableFuture<Void>
addConsumer(Consumer consumer) {
return CompletableFuture.completedFuture(null);
}
+ /**
+ * This method is used to help debugging addConsumer failed for exclusive
subscription.
+ * @param actConsumer
+ * @param consumer
+ * @return
+ */
+ private synchronized CompletableFuture<Void> internalAddConsumer(Consumer
actConsumer, Consumer consumer) {
+ addConsumerFailedAttemptCount++;
+ if (addConsumerFailedAttemptCount >= 5) {
+ log.warn("Added consumer failed with attempt count {}, consumers:
{}, active consumer: {},"
+ + "active state : {}",
+ addConsumerFailedAttemptCount, consumers, actConsumer,
actConsumer.cnx().isActive());
+ addConsumerFailedAttemptCount = 0;
Review Comment:
Perhaps a solution where the counter is passed as a parameter in the call
stack would be more reliable?
--
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]