Posts

Showing posts with the label hystrix

Programmatically changing Hystrix properties

Programmatically changing Hystrix properties I have a circuit breaker set up that I would like to change parameters for runtime. Things like threads and timeout needs to be tuned at customer site. I create a HystrixCommandProperties.Setter like this: HystrixCommandProperties.Setter hystrixProps = HystrixCommandProperties.defaultSetter() .withCircuitBreakerSleepWindowInMilliseconds(myconf.sleepWindow); HystrixThreadPoolProperties.Setter threadPoolSettings = HystrixThreadPoolProperties.Setter() .withCoreSize(myconf.threadPoolSize); new MyCommand(HystrixCommand.Setter.withGroupKey("mygroup") .andCommandPropertiesDefaults(hystrixProps) .andThreadPoolPropertiesDefaults(threadPoolSettings)); MyCommand implements standard HystrixCommand and calls super(hystrixProps). This works the first time, but when I try to change the properties at runtime (same group name) nothing happens. Is there another way to programmatically change this? I don't want to ...