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

@Retryable for Reactive Streams #92

Open
alexsderkach opened this issue Oct 31, 2017 · 10 comments
Open

@Retryable for Reactive Streams #92

alexsderkach opened this issue Oct 31, 2017 · 10 comments

Comments

@alexsderkach
Copy link

I want @retryable to work, out of the box, with Reactor & RxJava types.
Right now I am using custom annotation & aspect to achieve this.
It would be nice to have this in Spring.

@dsyer
Copy link
Member

dsyer commented Nov 4, 2017

Reactor has its own retry framework, and we don’t know yet if it can be adapted to the declarative model in spring-retry. It’s far from obvious how it would work (to me anyway). If you have some code you can share that will be great.

@alexsderkach
Copy link
Author

@dsyer The idea is to determine return type of method and if it is reactive, apply native retry operators to method invocation.

Here's brief code of idea:
alexsderkach@b3ed65d#diff-3bfaa81683b86ac2ed9fa843029363b6R362

@dsyer
Copy link
Member

dsyer commented Dec 1, 2017

That's a start. I see that you changed the contract of BackoffPolicy (and then it looks like you didn't use the value it generated in the non-reactive case?). We probably need to refactor it so that reactor is optional.

@alexsderkach
Copy link
Author

@dsyer We could achieve the same by adding additional classes, which will work when reactor is on classpath, without change of existing contracts.

If you approve this idea, I could implement this approach.

@dsyer
Copy link
Member

dsyer commented Dec 1, 2017

Sounds good.

@baotoushashou
Copy link

baotoushashou commented May 17, 2020

@dsyer So, Could spring-reply have supported the reactive streams? I have the same scenario.

@dsyer
Copy link
Member

dsyer commented May 18, 2020

Again, Reactor has its own retry mechanism. You should use it.

If we implement something here it is likely to be along the lines outlined in #176 (there's a branch in my fork with some working code).

See also #25, #154.

@baotoushashou
Copy link

@dsyer Ok. Thanks. I have used the retry of reactor. I seems everything is ok.

@CoderYellow
Copy link

Any update? Reactor built in retry framework is a bit hard to use, you can reference Resilience4j implementation

@gaofengIt
Copy link

gaofengIt commented Apr 9, 2023 via email

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

No branches or pull requests

5 participants