Comment From: wilkinsona
The latest changes break retries due to there being no bean named 'org.springframework.kafka.retrytopic.internalRetryTopicConfigurer'. We have this code at the moment:
https://github.com/spring-projects/spring-boot/blob/fbba3ffccd372a2548f4275fe59c539cfce89a65/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java#L148-L174
I think we may need to auto-configure a RetryTopicConfigurationSupport sub-class that backs off when the user's defined their own directly or via @EnableKafkaRetryTopic. I'm not really sure what this would mean for our existing retry-related properties.
@garyrussell @tomazfernandes can you please help us here?
Comment From: tomazfernandes
Hi @wilkinsona, makes sense, sorry we missed that.
I think we may need to auto-configure a RetryTopicConfigurationSupport sub-class that backs off when the user's defined their own directly or via @EnableKafkaRetryTopic.
Perhaps @garyrussell and @artembilan might have a different idea, but this seems like the proper behavior to me. But forgive my ignorance - why would we need a sub-class instead of the class itself?
I'm not really sure what this would mean for our existing retry-related properties.
As long as we're able to autoconfigure the support bean, I don't think this should change anything - all the autoconfiguration does so far is add a RetryTopicConfiguration bean to the context. Of course, I might be missing something.
I'm not sure if that's something you or @garyrussell would like to fix yourselves - once we figure out the proper behavior I'm available to write a PR if needed.
Thanks.
Comment From: wilkinsona
all the autoconfiguration does so far is add a RetryTopicConfiguration bean to the context
I've yet to grok the difference between a RetryTopicConfigurationSupport sub-class and a RetryTopicConfiguration bean. There are enough similarities with Spring MVC to make the code feel familiar and enough differences for it to confuse me. At this stage, that's due to my lack of familiarity with the code more than anything.
Comment From: tomazfernandes
I've yet to grok the difference between a
RetryTopicConfigurationSupportsub-class and aRetryTopicConfigurationbean. There are enough similarities with Spring MVC to make the code feel familiar and enough differences for it to confuse me. At this stage, that's due to my lack of familiarity with the code more than anything.
The RetryTopicConfigurationSupport subclassing is intended to let users configure framework-level features that will apply to the feature as a whole, such as global fatal exceptions and topic naming strategies, and have access to override the default infrastructure beans.
The RetryTopicConfiguration beans and @RetryableTopic annotations are specific configurations for given topics, and let users configure specific things like backoff, number of attempts, topic-specific exception classification, etc. The RetryTopicConfiguration can be applied to any given set of topics, while the annotation acts on the correspondent @KafkaListener topics.
Of course, perhaps the names could be clearer on its intentions, and probably the configuration strategy as a whole has room for improvement as well.
Comment From: garyrussell
This will affect Boot 2.7 users that wish to use s-k 2.9 as well.
Need to rethink.
Comment From: garyrussell
https://github.com/spring-projects/spring-kafka/pull/2343