eolivelli commented on PR #16545: URL: https://github.com/apache/pulsar/pull/16545#issuecomment-1188639978
> Hi, I have a concern about it. > > If the topic has some producers continue producing messages(not only this case). Is it better to use the `timestamp` to get the backlog? The user doesn't need to care about the `maxEntries`. If the user does not pass the timestamp, the broker will use the current time to search. If the user provides it, we will continue searching until the satisfying `timestamp` or `timeout` Because in the current implementation, if the admin wants to get the precious backlog, they will first search the topic, have how many un-acked entries and then get backlog. They have to use 2 steps to get it. But if they use a timestamp, they no longer need to care about `maxEntries`. @mattisonchao this API is to ave a more accurate value for the backlog, that means the number of messages that are still to be consumed by a subscription. So we always have to start from "lastMarkDelete" maxEntries and the timeout are there only to prevent scanning a huge number of data. when you have so many entries to process it is pointless to perform a accurate scan and we could overwhelm the broker. This is not a general purpose method to inspect a portion of a topic. If you need it, we can it in the future. -- 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]
