You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Disable HystrixCommands For FeignClients By Default #1277
The hystrix support in FeignClients is a nice to have but there is little indication that it is enabled by default and causes a number of problems. You may not even want circuit breakers in your client but you are getting them just by using Feign. An opt in approach would be more ideal, where the user has to enable Hystrix for their FeignClients in their app.
I am using Dalston.SR1 release in my POM.xml and I was unable to find "@HystrixCommand" , is it because of this change which is being discussed here? As I had to add "hystrix-javanica" dependency in the POM to make the annotation work. As in the "Camden.SR5" @HystrixCommand seems to work without explicitly adding "javanica" dependency in the POM.
SO, Maybe you Chinese guys Should keep an eye in my BLOG: http://www.itmuch.com
Since Spring Cloud Edgware will be released in short time, THINGS will change, AGAIN....
I'm PLANNING to write those CHANGES and IMPROVEMENTS in Spring Cloud Edgware.
LIKE:
Spring Cloud Edgware新特性之:解决Eureka中Jersey 1.x版本过旧的问题-不使用Jersey
Spring Cloud Edgware新特性之:如何配置Zuul的Hystrix线程池
Spring Cloud Edgware新特性之:使用配置属性自定义Feign的行为
Spring Cloud Edgware新特性之:Zuul routes端点功能增强
Activity
daniellavoie commentedon Aug 18, 2016
I like the idea that it would be deactivated by default. What would be the condition to activate it ? Classpath detection or property configuration ?
spencergibb commentedon Aug 18, 2016
classpath + property
daniellavoie commentedon Aug 18, 2016
I mean, If I just have hystrix in my classpath, would it be enough to active it ? Or will I have to also active a property ?
spencergibb commentedon Aug 18, 2016
It's currently just classpath.
spencergibb commentedon Aug 18, 2016
So you'll have to set a property
spencergibb commentedon Aug 26, 2016
@ryanjbaxter @dsyer do we want to do this in Camden?
ryanjbaxter commentedon Aug 26, 2016
I think so
ryanjbaxter commentedon Feb 23, 2017
@spencergibb @dsyer I think we should def do this for Dalston, thoughts?
spencergibb commentedon Feb 28, 2017
Sure. Needs to be documented and in the release notes.
[-]Diable HystrixCommands For FeignClients By Default[/-][+]Disable HystrixCommands For FeignClients By Default[/+]3 remaining items
tarunsapra commentedon Jul 17, 2017
Hi Guys,
Just wanted a small clarification -
I am using Dalston.SR1 release in my POM.xml and I was unable to find "@HystrixCommand" , is it because of this change which is being discussed here? As I had to add "hystrix-javanica" dependency in the POM to make the annotation work. As in the "Camden.SR5" @HystrixCommand seems to work without explicitly adding "javanica" dependency in the POM.
spencergibb commentedon Jul 18, 2017
@tarunsapra are you including spring-cloud-starter-hystrix as a dependency?
tarunsapra commentedon Jul 19, 2017
@spencergibb Yes, I am including the dependency -
spencergibb commentedon Jul 19, 2017
That is where
@HystrixCommandcomes from. There must be something else wrong with your dependencies.tarunsapra commentedon Jul 19, 2017
These are the dependency and If i don't include "netflix-javanica" then there is no
@HystrixCommandannotation on the classpath.`
org.springframework.boot
spring-boot-starter-parent
1.5.4.RELEASE
spencergibb commentedon Jul 19, 2017
If you can produce a small project that recreates the problem, please open another issue.
qianjinjiayin commentedon Jul 21, 2017
Default value is true in HystrixFeignConfiguration of 1.2.5 version
Default value is false in HystrixFeignConfiguration of 1.3.1 version
feign.hystrix.enabled=true
This can enable it.
cherrishccl commentedon Sep 11, 2017
How to user the Hystrix in Feign? Used version is <spring-cloud.version>Dalston.SR3</spring-cloud.version>
ryanjbaxter commentedon Sep 11, 2017
@CHERRISHGRY please don't ask questions on multiple issues like that.
hanrw commentedon Oct 16, 2017
+1
Docs not updated!!!
http://cloud.spring.io/spring-cloud-static/spring-cloud-netflix/1.3.5.RELEASE/single/spring-cloud-netflix.html#netflix-hystrix-starter
```
Which means it's should be enable:true as default.
If you need to use ThreadLocal bound variables in your RequestInterceptor
s you will need to either set the thread isolation strategy for Hystrix toSEMAPHORE or disable Hystrix in Feign.application.yml
To disable Hystrix in Feign
feign:
hystrix:
enabled: false
To set thread isolation to SEMAPHORE
hystrix:
command:
default:
execution:
isolation:
strategy: SEMAPHORE
eacdy commentedon Oct 16, 2017
@MADEINCHINA Docs are here: http://cloud.spring.io/spring-cloud-static/spring-cloud-netflix/1.3.5.RELEASE/single/spring-cloud-netflix.html#spring-cloud-feign-hystrix .
BUT many people havn't notice that.
SO, Maybe you Chinese guys Should keep an eye in my BLOG: http://www.itmuch.com
Since Spring Cloud Edgware will be released in short time, THINGS will change, AGAIN....
I'm PLANNING to write those CHANGES and IMPROVEMENTS in Spring Cloud Edgware.
LIKE:
Spring Cloud Edgware新特性之:解决Eureka中Jersey 1.x版本过旧的问题-不使用Jersey
Spring Cloud Edgware新特性之:如何配置Zuul的Hystrix线程池
Spring Cloud Edgware新特性之:使用配置属性自定义Feign的行为
Spring Cloud Edgware新特性之:Zuul routes端点功能增强
AND SO ON.
chendifan commentedon Mar 7, 2018
嘻嘻嘻,嘿嘿嘿