This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository

The following commit(s) were added to refs/heads/master by this push:
     new 39112f4  Fix: deadlock while closing non-shared consumer (#1591)
39112f4 is described below

commit 39112f4f961aa711d249a78fc76f72494d37f346
Author: Rajan Dhabalia <>
AuthorDate: Mon Apr 16 22:25:40 2018 -0700

    Fix: deadlock while closing non-shared consumer (#1591)
    * Fix: deadlock while closing non-shared consumer
    * removing consumer async cause failure in unsubscribe. so, remove 
subscription async from topic
 .../pulsar/broker/service/persistent/    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
index a3e8a34..3cface2 100644
@@ -153,7 +153,11 @@ public class PersistentSubscription implements 
Subscription {
             if (!cursor.isDurable()) {
                 // If cursor is not durable, we need to clean up the 
subscription as well
-                topic.removeSubscription(subName);
+                // when topic closes: it iterates through 
concurrent-subscription map to close each subscription. so,
+                // topic.remove again try to access same map which creates 
deadlock. so, execute it in different thread.
+                topic.getBrokerService().pulsar().getExecutor().submit(() ->{
+                    topic.removeSubscription(subName);
+                });

To stop receiving notification emails like this one, please contact

Reply via email to