GH-4388: Cross-reference alwaysStartAfterRefresh from autoStartup and autoStartDltHandler Javadoc - #4499
Open
won-seoop wants to merge 1 commit into
Open
Conversation
…toStartup and autoStartDltHandler Javadoc Add a note to @KafkaListener.autoStartup(), @RetryableTopic.autoStartDltHandler(), and KafkaListenerEndpointRegistry.setAlwaysStartAfterRefresh() documenting that the registry's alwaysStartAfterRefresh flag (default true) overrides autoStartup/ autoStartDltHandler after context refresh. This makes the override behaviour discoverable from both sides of the relationship, preventing the confusing scenario where autoStartDltHandler=false has no effect in tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #4388 (Javadoc / docs improvement).
KafkaListenerEndpointRegistry.setAlwaysStartAfterRefresh()was the only place documenting that this flag overridesautoStartupafter a context refresh — creating a hard-to-discover one-way reference. This leads to confusing behaviour in tests where@KafkaListener(autoStartup = "false")or@RetryableTopic(autoStartDltHandler = "false")appear to be silently ignored.Changes
@RetryableTopic.autoStartDltHandler()— added aNoteparagraph explaining thatalwaysStartAfterRefresh=true(the default) can override this after context refresh, with a@seelink tosetAlwaysStartAfterRefresh.@KafkaListener.autoStartup()— same note and@seelink.KafkaListenerEndpointRegistry.setAlwaysStartAfterRefresh()— added back-links to@KafkaListener.autoStartup()and@RetryableTopic.autoStartDltHandler()so the relationship is visible from both sides.No behavioural changes; Javadoc only.
Test plan
./gradlew javadoc— verify no Javadoc warnings introduced🤖 Generated with Claude Code