According to the documentation, when using Feign with Hystrix every request is wrap into a Hystrix command.
Is it possible to set Hystrix Properties to these commands? I'd like to do something like this:
@RequestMapping(commandProperties = {
@HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "30000")})
List<Team> findAll();
or:
@FeignClient(name = "teams", commandProperties = {
@HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "30000")})
For the records, I've already tried to use properties but it didn't work. These ones are working:
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000
hystrix.command.findAll.execution.timeout.enabled=false
hystrix.command.default.execution.timeout.enabled=false
But this one does not:
hystrix.command.findAll.execution.isolation.thread.timeoutInMilliseconds=20000
Indeed, we can read the following comment into the HystrixCommandProperties
class:
//this property name is now misleading. //TODO figure out a good way to deprecate this property name
this.executionTimeoutInMilliseconds = getProperty(propertyPrefix, key, "execution.isolation.thread.timeoutInMilliseconds", builder.getExecutionIsolationThreadTimeoutInMilliseconds(), default_executionTimeoutInMilliseconds);
EDIT: I have tried to use the feign' Request.Option but these properties doesn't seem to propagate to hystrix.