Closed sergey-morenets closed 3 years ago
yes, this was left out do to timing. It was done in spring cloud config so it is possible.
Thank you, @spencergibb So the only way now to use Spring Retry in Spring Cloud Consul Config is to use legacy configuration approach with bootstrap.yml?
for now, using bootstrap will get you retry support.
for now, using bootstrap will get you retry support.
Great. Can you please update documentation that Spring Retry is not supported with spring.config.import option now? I was under impression it is supported and spent a lot of time on the investigation.
I can't update the docs since they are part of the release, but I will add something to the known issues section of the release notes
Thank you, @spencergibb Unfortunately I can't use "legacy" way because of another issue that I found: https://github.com/spring-cloud/spring-cloud-commons/issues/893
@spencergibb Thank you for the fix. Do you have estimation for 3.0.2 release date?
https://github.com/spring-cloud/spring-cloud-release/milestones
Hi, can i say that after the fix, this is resolved. I am currently 2020.0.3, but yet the retry still not working.
@hanct I'm not sure I understand. This issue was to support retry with spring.config.import with consul. Either it works or it doesn't. If you'd like us to spend some time investigating, please take the time to open a new issue and provide a complete, minimal, verifiable sample (something that we can unzip attached to the new issue or git clone, build, and deploy) that reproduces the problem.
Spring Cloud Consul Config always supported Spring Retry and there's a special consulRetryInterceptor bean in RetryConfiguration class (part of ConsulAutoConfiguration class).
Spring Boot 2.4 introduced new property - spring.config.import which we can use to specify Consul Config client settings:
But it seems new approach doesn't support Spring Retry by two reasons:
1) consulRetryInterceptor bean loaded after spring.config.import configuration had been processed 2) There's no @Retryable methods in this new approach. ConsulPropertySourceLocator (which contains @Retryable methods) is not used
The first issue can be resolved by creating custom high-order EnvironmentPostProcessor. But the second issue seems unsolvable for now.
Please advice on how to use Spring Retry and spring.config.import together.