navina commented on code in PR #9859:
URL: https://github.com/apache/pinot/pull/9859#discussion_r1036471037
##########
pinot-plugins/pinot-stream-ingestion/pinot-pulsar/src/main/java/org/apache/pinot/plugin/stream/pulsar/PulsarStreamMetadataProvider.java:
##########
@@ -156,11 +174,21 @@ public List<PartitionGroupMetadata>
computePartitionGroupMetadata(String clientI
LOGGER.warn("Error encountered while calculating pulsar partition group
metadata: " + e.getMessage(), e);
} finally {
closeConsumer(consumer);
+ deleteSubscription(_topic, subscription);
}
return newPartitionGroupMetadataList;
}
+ private void deleteSubscription(String topicName, String subscription) {
+ try {
+ _pulsarAdminClient.topics().deleteSubscription(topicName, subscription);
Review Comment:
Alright. I was able to verify with pulsar standalone mode that the
non-durable subscription gets instantly deleted if the consumer is closed. 👏
@mathieudruart the actual root cause of all those unused subscriptions not
getting cleaned up on the broker is due to the fact that we are not closing the
consumer properly in the metadata provider. I have already fixed that in the
PR.
Will update the PR to use NonDurable subscription mode and remove the
explicit delete.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]