Improve retry configuration validation in RetryableTopicAnnotationPro… - #4395
Arbaz4Sayyad wants to merge 1 commit into
Conversation
…cessor - Add validation for retry attempts to ensure they are greater than 0 - Provide clear error messages when invalid values are provided - Add comprehensive unit tests for the new validation - Prevents invalid configurations and improves developer experience Signed-off-by: Arbaz4Sayyad <arbaz4sayyad@gmail.com>
5805036 to
207a431
Compare
|
Hi maintainers, I’ve implemented the proposed change and added test coverage. Happy to update the PR based on feedback. Thanks! |
artembilan
left a comment
There was a problem hiding this comment.
Hi, @Arbaz4Sayyad !
Thank you for contribution.
Execution failed for task ':spring-kafka:checkstyleTest'.
> A failure occurred while executing org.gradle.api.plugins.quality.internal.CheckstyleAction
> Checkstyle rule violations were found. See the report at: file:///home/runner/work/spring-kafka/spring-kafka/spring-kafka/build/reports/checkstyle/test.html
Checkstyle files with violations: 1
Checkstyle violations by severity: [error:5]
Please, run ./gradlew check locally before pushing to this PR's branch.
|
Closing this PR as the retry validation feature has been incorporated into PR #4397. The retry configuration validation improvements are now part of the checkstyle fixes PR to avoid duplicate work and streamline the review process. Thanks for understanding! |
|
First of all don’t call
I don’t think this was the right decision. Those are different concerns even if they talk about the same class. And from our perspective that even make review more complicated. please, revise your decision and concentrate on small and straightforward changes. |
Problem
Retry configuration does not validate invalid values such as zero or negative attempts, leading to unclear error messages at runtime.
Root Cause
Missing validation logic in RetryableTopicAnnotationProcessor.
Solution
Impact
Testing
Example
Before: @RetryableTopic(attempts = "0") would fail with unclear error
After: @RetryableTopic(attempts = "0") fails immediately with "Retry attempts must be greater than 0, but got: 0"