You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2021/08/24 13:02:17 UTC
[pulsar] branch master updated: [pulsar-client] remove consumer
reference from PulsarClient on subscription failure (#11758)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new c2bd23d [pulsar-client] remove consumer reference from PulsarClient on subscription failure (#11758)
c2bd23d is described below
commit c2bd23d1676e17135eb9a5044a939069c89588e9
Author: Rajan Dhabalia <rd...@apache.org>
AuthorDate: Tue Aug 24 06:01:35 2021 -0700
[pulsar-client] remove consumer reference from PulsarClient on subscription failure (#11758)
---
.../main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
index 6c7624d..f618ccb 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
@@ -877,6 +877,7 @@ public class MultiTopicsConsumerImpl<T> extends ConsumerBase<T> {
.exceptionally(e -> {
log.warn("Failed subscription for createPartitionedConsumer: {} {}, e:{}",
topicName, numPartitions, e);
+ consumer.cleanupMultiConsumer();
subscribeFuture.completeExceptionally(
PulsarClientException.wrap(((Throwable) e).getCause(), String.format("Failed to subscribe %s with %d partitions", topicName, numPartitions)));
return null;