Disable Hystrix support when using Feign by default. Fixes #1277.

This commit is contained in:
Ryan Baxter
2017-03-01 11:35:08 -05:00
parent de886d6c3d
commit 54c052c5eb
8 changed files with 37 additions and 12 deletions

View File

@@ -1062,9 +1062,7 @@ NOTE: `PROD-SVC` is the name of the service the Clients will be making requests
[[spring-cloud-feign-hystrix]]
=== Feign Hystrix Support
If Hystrix is on the classpath, by default Feign will wrap all methods with a circuit breaker. Returning a `com.netflix.hystrix.HystrixCommand` is also available. This lets you use reactive patterns (with a call to `.toObservable()` or `.observe()` or asynchronous use (with a call to `.queue()`).
To disable Hystrix support for Feign, set `feign.hystrix.enabled=false`.
If Hystrix is on the classpath and `feign.hystrix.enabled=true`, Feign will wrap all methods with a circuit breaker. Returning a `com.netflix.hystrix.HystrixCommand` is also available. This lets you use reactive patterns (with a call to `.toObservable()` or `.observe()` or asynchronous use (with a call to `.queue()`).
To disable Hystrix support on a per-client basis create a vanilla `Feign.Builder` with the "prototype" scope, e.g.: