spring-retry icon indicating copy to clipboard operation
spring-retry copied to clipboard

RetrySynchronizationManager cause my context lost

Open zyx13131133 opened this issue 1 year ago • 1 comments

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

zyx13131133 avatar May 31 '23 07:05 zyx13131133

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.

artembilan avatar May 31 '23 13:05 artembilan