MarvinCai opened a new pull request #10093:
URL: https://github.com/apache/pulsar/pull/10093
### Motivation
As discussed in issue #9680, although we can use message TTL to expire the
backlogs of the subscription, but it still be good to have a time based backlog
quota so broker can apply back pressure strategy when quota exceeded and stop
creating more producer.
### Modifications
In BacklogQuota add time based backlog, in BacklogQuotaManager add
dropBacklogForTimeLimit to drop message when time based backlog quota exceeded.
Add isTimeBacklogExceeded in PersistentTopic to check whether time based
backlog quota has exceeded for given topic.
### Verifying this change
This change added tests and can be verified as follows:
- Added unit test to verify time based backlog is applied properly,
including drop message and resume normal production when backlog is cleared.
### Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API: no
- The schema: no
- The default values of configurations: no
- The wire protocol: no
- The rest endpoints: no
- The admin cli options: no
- Anything that affects deployment: no
### Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs
/ not documented)
- If a feature is not applicable for documentation, explain why?
- If a feature is not documented yet in this PR, please create a followup
issue for adding the documentation
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]