Does Spring Cloud Feign client call execute inside hystrix command?

半城伤御伤魂 提交于 2019-12-10 14:17:53

问题


I'm configuring a sample application using this example: http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance. In this section http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-ribbon it is said that:

Feign already uses Ribbon, so if you are using @FeignClient then this section also applies

Does that mean that @FeignClient uses Hystrix too? Does the call to feign client execute inside hystrix command? if so, what is the proper way to pass hystrix configuration?

There are samples that wrap calls to feign client with @HystrixCommand. Is it a correct way?


回答1:


There is an open ticket to support hystrix with feign. Currently, you need to wrap calls to feign clients with hystrix.




回答2:


please use semaphore isolation:

hystrix:
  command:
    default:
      execution:
        isolation:
          strategy: SEMAPHORE


来源:https://stackoverflow.com/questions/32482704/does-spring-cloud-feign-client-call-execute-inside-hystrix-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!