Slackbot
07/05/2023, 6:07 PMAndy Walker
07/05/2023, 6:56 PMtopics analyze-backlog admin command provided by the following API endpoints:
admin/v2/non-persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/analyzeBacklog
admin/v2/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/analyzeBacklog
Meaning you can at least get those counts, even though it's more expensive and requires safeguards to avoid DOS.
I don't have any deeper insight into why backlog isn't more precisely precomputed, however I imagine it has to do with the complexity of tracking subscription position as well as the "real" number of messages and keeping those deltas up to date and meaningful.Andy Kirsch
07/05/2023, 6:57 PM