Skip to content

Commit

Permalink
[pulsar-client] remove consumer reference from PulsarClient on subscr…
Browse files Browse the repository at this point in the history
…iption failure (apache#11758)
  • Loading branch information
rdhabalia authored Aug 24, 2021
1 parent 9558c54 commit c2bd23d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,7 @@ public static <T> MultiTopicsConsumerImpl<T> createPartitionedConsumer(PulsarCli
.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;
Expand Down

0 comments on commit c2bd23d

Please sign in to comment.