codelipenghui opened a new pull request, #16389:
URL: https://github.com/apache/pulsar/pull/16389
### Motivation
Provide a way to create the ledger cursor lazily. It can reduce the
subscription creation time-consuming.
In the case of millions of topics, consumers can complete subscriptions more
quickly.
After enabling this feature, the cursor ledger will create will be created
during the message acknowledgment.
If there are no message acknowledgments happened on a subscription, the
cursor ledger will not be created.
### Modification
Added new configuration to enable the cursor ledger lazy creation
```
# Whether to create the cursor ledger lazily when recovering a managed
cursor backing a durable subscription.
# It can reduce the subscription creation time-consuming. In the case of
millions of topics, consumers can complete
# subscriptions more quickly.
#
# After enabling this option, the cursor ledger will create will be created
during the message acknowledgment.
# If there are no message acknowledgments happened on a subscription, the
cursor ledger will not be created.
# Default is false.
managedLedgerLazyCursorLedgerCreationEnabled=false
```
### Documentation
Check the box below or label this PR directly.
Need to update docs?
- [x] `doc-required`
(Your PR needs to update docs and you will update later)
- [ ] `doc-not-needed`
(Please explain why)
- [ ] `doc`
(Your PR contains doc changes)
- [ ] `doc-complete`
(Docs have been already added)
--
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]