Netflix / Hystrix

Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.
24.07k stars 4.7k forks source link

Set maximumSize using @HystrixCommand annotation #1565

Open ilyas-keser opened 7 years ago

ilyas-keser commented 7 years ago

It is not possible to set the maximumSize using the HystrixCommand annotation. Example:

  @HystrixCommand(ignoreExceptions = MyException.class,
    threadPoolProperties = {
      @HystrixProperty(name = "coreSize", value = "20"),
      @HystrixProperty(name = "maximumSize", value = "25"),
      @HystrixProperty(name = "allowMaximumSizeToDivergeFromCoreSize", value = "true")
  })
  public MyPerson getMyPerson(...)

Hystrix version: 1.5.11

Exception:

Caused by: java.lang.IllegalArgumentException: unknown thread pool property: maximumSize
    at com.netflix.hystrix.contrib.javanica.conf.HystrixPropertiesManager.initializeProperties(HystrixPropertiesManager.java:125)
    at com.netflix.hystrix.contrib.javanica.conf.HystrixPropertiesManager.initializeThreadPoolProperties(HystrixPropertiesManager.java:108)
    at com.netflix.hystrix.contrib.javanica.command.GenericSetterBuilder.build(GenericSetterBuilder.java:81)
mattrjacobs commented 7 years ago

@dmgcodevil Any cycles to work on this?

@ilyas-keser Any interest in submitting a PR for this functionality?

dmgcodevil commented 7 years ago

PR: https://github.com/Netflix/Hystrix/pull/1572

ilyas-keser commented 7 years ago

@dmgcodevil Is it possible to set allowMaximumSizeToDivergeFromCoreSize? The maximumSize setting only takes effect if you also set the allowMaximumSizeToDivergeFromCoreSize setting.

mattrjacobs commented 7 years ago

@ilyas-keser I just submitted #1584

ilyas-keser commented 7 years ago

@mattrjacobs Thanks!

dmgcodevil commented 6 years ago

we can close