GH-3706: Align RetryTopicConfigurationBuilder default with @RetryableTopic#4235
GH-3706: Align RetryTopicConfigurationBuilder default with @RetryableTopic#4235h2jinee wants to merge 1 commit intospring-projects:mainfrom
Conversation
artembilan
left a comment
There was a problem hiding this comment.
Please, rebase your PR to latest main.
Fix the respective new for the change to 4.1 already.
Add your name to the @author list of all the affected classes.
|
Rebased on latest |
artembilan
left a comment
There was a problem hiding this comment.
Thanks for the update.
Please, find our further review below.
|
|
||
| NOTE: The default behavior is to create separate retry topics for each attempt, appended with an index value: retry-0, retry-1, ..., retry-n. | ||
| Therefore, by default the number of retry topics is the configured `maxAttempts` minus 1. | ||
| NOTE: Starting with version 4.0, the default behavior is to reuse a single retry topic for the same delay intervals. To create separate retry topics for each attempt, set `sameIntervalTopicReuseStrategy` to `MULTIPLE_TOPICS`. |
There was a problem hiding this comment.
Missed this one.
We are already in version 4.1.
| .sameIntervalTopicReuseStrategy(SameIntervalTopicReuseStrategy.MULTIPLE_TOPICS) | ||
| .create(template); | ||
| } | ||
| ---- |
There was a problem hiding this comment.
This is not what whats-new is about.
We should give a short description of what was changes and lead to the target chapter with more details.
|
Thanks! I've updated the version and the |
|
Please, rebase your branch to the latest |
artembilan
left a comment
There was a problem hiding this comment.
Just couple nit-picks for code perfection.
Thanks
|
|
||
| NOTE: The default behavior is to create separate retry topics for each attempt, appended with an index value: retry-0, retry-1, ..., retry-n. | ||
| Therefore, by default the number of retry topics is the configured `maxAttempts` minus 1. | ||
| NOTE: Starting with version 4.1, the default behavior is to reuse a single retry topic for the same delay intervals. To create separate retry topics for each attempt, set `sameIntervalTopicReuseStrategy` to `MULTIPLE_TOPICS`. |
There was a problem hiding this comment.
One sentence per line: https://asciidoctor.org/docs/asciidoc-recommended-practices/#one-sentence-per-line
| ---- | ||
|
|
||
| NOTE: The default behavior is creating separate retry topics for each attempt, appended with their index values: retry-0, retry-1, ... | ||
| NOTE: Starting with version 4.1, the default behavior is to use a single topic for fixed delay retries. To use multiple topics, set `sameIntervalTopicReuseStrategy` to `MULTIPLE_TOPICS`. |
| See xref:kafka/receiving-messages/listener-annotation.adoc[`@KafkaListener` Annotation] for more information. | ||
|
|
||
| [[x41-retry-topic-builder-default]] | ||
| === RetryTopicConfigurationBuilder Default Strategy Change |
There was a problem hiding this comment.
The RetryTopicConfigurationBuilder has to be present as a code snippet. Use single back-ticks to do that.
|
I've applied the requested changes. Please let me know if anything else is needed. |
artembilan
left a comment
There was a problem hiding this comment.
Please, rebase your branch to the latest upstream main:
git checkout main
git pull upstream main
git checkout -
git rebase main
There might be some conflicts for that whats-new, but that is exactly why I'm asking you to do that.
Thanks
…with @RetryableTopic Fixes spring-projectsGH-3706 (spring-projects#3706) * change default sameIntervalTopicReuseStrategy from MULTIPLE_TOPICS to SINGLE_TOPIC * update topic-naming.adoc to reflect new default behavior * add migration guide in whats-new.adoc * update tests to explicitly use MULTIPLE_TOPICS where needed Signed-off-by: h2jinee <wjsgmlwls97@gmail.com>
|
Rebased onto the latest upstream main and resolved the |
Fixes #3706
Summary
Align the default
sameIntervalTopicReuseStrategyinRetryTopicConfigurationBuilderwith@RetryableTopicannotation (both now default toSINGLE_TOPIC).Changes
MULTIPLE_TOPICStoSINGLE_TOPICinRetryTopicConfigurationBuildertopic-naming.adocto reflect new default behaviorwhats-new.adocMULTIPLE_TOPICSwhere neededMigration
To restore previous behavior: