[pulsar-client] remove consumer reference from PulsarClient on subscription failure
@@ -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;
