-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
iss1403: Support @HystrixCommand for rx.Single and rx.Completable sim… #1524
Conversation
…ilar to rx.Observable
Can you add tests showing the case where fallbacks get triggered? Specifically, I think that a mismatch between execution type and fallback type should be disallowed. For example, an execution returning a Completable and a fallback returning an Observable is nonsensical. |
…cObservableCommand related to these RX types
@mattrjacobs thanks for reviewing. I added more test cases for successful scenarios, reviled some issues and resolved them. Regarding a 'failure' scenarios, there is only one special that requires a workaround is public static class Service {
@HystrixCommand(fallbackMethod = "fallback")
public Observable<User> command() { throw new IllegalStateException(); }
private User fallback() { return null; }
} after a little thinking I thought that it makes sense to support this behavior for Completable, so the following code is legit as well: public static class Service {
@HystrixCommand(fallbackMethod = "fallback")
public Completable command() { throw new IllegalStateException(); }
private User fallback() { return null; }
} I will update docs shortly |
@mattrjacobs I guess you can merge this one |
|
Sorry for the delay on this @dmgcodevil . I'm still trying to figure out how much value this adds if My understanding of this feature is that it will take a user-provided Single/Completable and convert that into a I'm writing a unit test to check that submitting a |
Confirmed this in #1574 |
So my thought is that this will help users on |
Requested by #1403