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

threadPoolProperties ignored in GenericSetterBuilder#buildObservableCommandSetter #1611

Open
ghostganz opened this issue Jun 13, 2017 · 5 comments

Comments

@ghostganz
Copy link

Using HystrixCommand annotation on a method returning Observable, the "threadPoolProperties" are ignored.

https://github.com/Netflix/Hystrix/blob/master/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/command/GenericSetterBuilder.java

It's because the build() method (for non-Observables) copies those settings, but they are ignored in the buildObservableCommandSetter(). There's a TODO there hinting at the problem.

Most users won't notice this, since the isolation strategy doesn't default to THREAD for observables.

@ghostganz
Copy link
Author

More of the same problem: HystrixObservableCommand.Setter has protected fields threadPoolKey and threadPoolPropertiesDefaults, but there's no way to change them.

@ramnight
Copy link

ramnight commented Jun 14, 2017

Is that a bug?
Or is there any other reason?
I want to use the Observable in THREAD mode, but I can't change the thread pool config。

@mattrjacobs
Copy link
Contributor

I can't think of any reason you would use a thread pool with HystrixObservableCommand. There's an outstanding issue to deprecate and remove this API (#1200), but that hasn't been done yet.

@ramnight
Copy link

I found solution in #805 (comment),
thanks a lot.

@ghostganz
Copy link
Author

We have, for historical reasons, things that use Observable although they aren't completely asynchronous, so we need threads to have those things running well.

In an ideal world that wouldn't be needed, but ...

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

3 participants