zhenglaizhang opened a new pull request #5950: [Issue 5927][Pulsar Client] Change the time unit of `patternAutoDiscoveryPeriod to seconds URL: https://github.com/apache/pulsar/pull/5950 Fixes #5927 ### Motivation Per #5927, by adding one overload to configure patternAutoDiscoveryPeriod by time units, users may be able to configure the time duration to be less than 1 minute. ### Modifications 1. Add an overload of `ConsumerBuilder.patternAutoDiscoveryPeriod` 2. Update original `ConsumerBuilderImpl.patternAutoDiscoveryPeriod` to call the new overload 3. Update the `PatternMultiTopicsConsumerImpl.recheckPatternTimeout` logic, this should be carefully reviewed, since I don't understand the original logic, it seems the old implementation will only allow 0 or 1 minute as the recheck interval, ignoring the user's periods which longer than 1 minute ### Verifying this change - Add the unit test to verify param invalidness - Update one unit test in `PatternTopicsConsumerImplTest.testAutoUnbubscribePatternConsumer` to use 10 seconds period (if another new test is requested per review i will add it later) ### Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API: (yes) ( I think the consumer builder might be classified as public api, plz help correct me if wrong, thx) - 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) - If yes, how is the feature documented? (JavaDocs) ### Future Discussion - Personally I think the new overload `patternAutoDiscoveryPeriod(interval,unit)` may have more meaningful semantic, will there be any plan to deprecate the old method?
---------------------------------------------------------------- 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] With regards, Apache Git Services
