2016-08-08 11 views
1

Ich benutze die hystrix api Version 1.5.4. Ich sehe, dass die Methode withExecutionIsolationThreadTimeoutInMilliseconds veraltet ist. Was ist die alternative Methode?Hystrix-Methode nicht mehr empfohlen

public HystrixHelloCommand(String message) { 
    super(HystrixCommand.Setter.withGroupKey(HystrixCommandGroupKey.Factory.asKey("MyGroup")).andCommandPropertiesDefaults(
    HystrixCommandProperties.Setter() 
    .withCircuitBreakerEnabled(true).withExecutionIsolationThreadTimeoutInMilliseconds(2000))); 
} 

Antwort

1

Gemäß der Doc es durch withExecutionTimeoutInMilliseconds ersetzt wird, und dies ist, was es sagt:

com.netflix.hystrix.HystrixCommandProperties.Setter.withExecutionIsolationThreadTimeoutInMilliseconds (int) Ab 1.4.0, ersetzt durch HystrixCommandProperties.Setter.withExecutionTimeoutInMilliseconds (int). Timeouts werden nicht mehr nur auf thread-isolierte Befehle angewendet, daher ist ein Thread-spezifischer -Name irreführend.

Verwandte Themen