Hystrix: Support for RxJava version 2.x

Created on 11 Jan 2017  路  11Comments  路  Source: Netflix/Hystrix

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?

Most helpful comment

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.

All 11 comments

Nothing ongoing at the moment

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

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.

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?

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());

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.

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

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.

Any Idea when we can expect this

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

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

Was this page helpful?
0 / 5 - 0 ratings