Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate RetryTemplate in Listener Adapters #1886

Closed
garyrussell opened this issue Jul 26, 2021 · 5 comments · Fixed by #1887
Closed

Deprecate RetryTemplate in Listener Adapters #1886

garyrussell opened this issue Jul 26, 2021 · 5 comments · Fixed by #1887
Assignees
Milestone

Comments

@garyrussell
Copy link
Contributor

Functionality has been replaced by enhancements to the error handlers and causes confusion.

@garyrussell garyrussell added this to the 2.8.0-M2 milestone Jul 26, 2021
@garyrussell garyrussell self-assigned this Jul 26, 2021
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Jul 26, 2021
artembilan pushed a commit that referenced this issue Jul 26, 2021
Resolves #1886

* Missed a deprecation warning.

* Use FQCN.
garyrussell added a commit that referenced this issue Mar 16, 2022
garyrussell added a commit that referenced this issue Mar 16, 2022
@Cpinto0594
Copy link

@garyrussell is it possible to add a retry mechanism for each listener? i'm registering listeners dynamically with MethodKafkaListenerEndpoint ?

@garyrussell
Copy link
Contributor Author

Don’t ask questions on old, closed, issues. Use the Discussions tab Q&A or ask on stack overflow. Show code, configuration, and exactly what you mean.

Retry in the listener adapter has been completely replaced by functionality in the error handlers for several years, now.

@garyrussell
Copy link
Contributor Author

If you mean you want different retry settings for listeners created by the same container factory, you can add a ContainerCustomizer to the container factory and set the retry semantics in the container's error handler there.

@pkgonan
Copy link

pkgonan commented Jul 7, 2023

@garyrussell
Hi,

If the receiver adapter is changed to not retry, how do I retry?

There must be an alternative, but there seems to be no guide on how to handle it.

@artembilan
Copy link
Member

The Javadoc of the deprecated RetryingMessageListenerAdapter says:

* @deprecated since 2.8 - use a suitably configured error handler instead.

Then according to the docs: https://docs.spring.io/spring-kafka/docs/2.8.11/reference/html/#migrating-legacy-eh and https://docs.spring.io/spring-kafka/docs/2.8.11/reference/html/#default-eh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants