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

Support for RxJava version 2.x #1457

Open
ToastShaman opened this issue Jan 11, 2017 · 11 comments
Open

Support for RxJava version 2.x #1457

ToastShaman opened this issue Jan 11, 2017 · 11 comments

Comments

@ToastShaman
Copy link

ToastShaman commented Jan 11, 2017

RxJava 1.x will reach it's end of life at the end of March 2018 and feature freeze in June 2017. Are there any plans upgrading Hystrix to use RxJava 2.x?

@mattrjacobs
Copy link
Contributor

Nothing ongoing at the moment

@cj3ns3n
Copy link

cj3ns3n commented May 9, 2017

Does this mean that if we want to use RxJava 2.x we should implement our own solution for circuit breakers and fault tolerance?

@mattrjacobs
Copy link
Contributor

If you wanted to use Hystrix as-is, then you would need to do the following:

  1. If you're using HystrixObservableCommand, you need to provide a RxJava 1.x Observable. This library provides a well-tested mechanism for turning a RxJava 2.x type into an RxJava 1.x Observable: https://github.com/akarnokd/RxJava2Interop

  2. If you're consuming the output of either HystrixCommand or HystrixObservableCommand via
    observe() or toObservable(), then you could convert the RxJava 1.x Observable to the proper RxJava 2.x type at the point where you consumer that value using the same library.

There should be no practical problem with Hystrix and RxJava 2.x co-existing.

@sircelsius
Copy link

So doing something like the following is the recommended approach?

  public Flowable<Long> doSomething() {
    return Flowable.defer(() ->
      Flowable.create(e -> new SomeHystrixCommand()
        .observe()
        .subscribe(e::onNext,
          e::onError,
          e::onComplete),
        BackpressureStrategy.ERROR // or whatever backpressure strategy you want
      )
    );
  }

Nothing ongoing at the moment

@mattrjacobs is that answer still up to date?

@kennymacleod
Copy link

Whilst we're waiting for Hystrix to catch up, we can use the excellent RxJavaInterop library to convert to the RxJava2 API, e.g.

RxJavaInterop.toV2Flowable(new SomeHystrixCommand.toObservable());

@mattnelson
Copy link

rxjava-1 is officially EOL > https://github.com/ReactiveX/RxJava/releases/tag/v1.3.8

I don't specifically need rxjava2. My primary concern is that this library is now locked into a dependency that will no longer be capable of taking bug fixes.

@umangsingh123
Copy link

Is there any update on this . Are there any plans to upgrade Rx version inside Hystrix.

@casidiablo
Copy link

I guess we'll have to fork it/update it to rxjava2. If netflix is still running rxjava1 across all of their stack, I see how this is not a priority for them.

@umangsingh123
Copy link

Any Idea when we can expect this

@mattnelson
Copy link

I would guess never based on the current status of this project.

Netflix Hystrix is now officially in maintenance mode, with the following expectations to the greater community: Netflix will no longer actively review issues, merge pull-requests, and release new versions of Hystrix.

https://github.com/Netflix/Hystrix#hystrix-status

@umangsingh123
Copy link

Apologies but to understand this better and i can communicate the same .
So now we are saying Hystrix would be used from third part apps as said on the page .

For the cases where something like Hystrix makes sense, we intend to continue using Hystrix for existing applications, and to leverage open and active projects like resilience4j for new internal projects

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

8 participants