Search code examples
spring-cloudspring-cloud-netflixspring-cloud-feign

Spring Cloud: How to configure Hystrix in @FeignClient


I have following service:

@FeignClient(name = "person", fallback = FeignHystrixFallback.class)
public interface PersonService {

    @RequestMapping(value = "/find", method = RequestMethod.GET)
    Person findPerson(@RequestParam("name") String name);
}

How to change the default timeout and thread pool size?


Solution

  • There are other people that have run into this issue and have posted questions and have answers. The most relevant is this post:

    Feign builder timeouts not working

    If you are wanting to manage the configuration of Feign you would want to check out the Feign documentation looking at the "configuration" attribute of the @FeignClient annotation.