spring-retry
spring-retry copied to clipboard
RetrySynchronizationManager cause my context lost
RetrySynchronizationManager use ThreadLocal. when use @Async cooperate @Retryable Will cause the context data I set myself to be lost. Can open an interface for setting up the Theadlocal type
It does not make sense to apply the retry on an async method: we just would eliminate the purpose of an async nature to get a gain from the retry - essentially blocking that async call to catch a possible exception from there. Therefore your request is not clear: we need more details and clarification how that suppose to work without breaking any original goals of your services design.