hystrix-javanica注释中的HystrixCommand接口缺少ThreadPoolProperties

时间:2014-10-23 21:49:28

标签: java aspectj netflix hystrix

我正在尝试将hystrix-javanica用于HystrixCommand的AspectJ注释。 我可以按如下方式配置命令属性:

@HystrixCommand(commandKey = "myCommand",
    groupKey = "myServiceImpl",
    threadPoolKey = "myThreadPoolKey",
    fallbackMethod = "getFallback",
    commandProperties = {
    @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value =       "20000"),
    @HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "1000"),
    @HystrixProperty(name = "circuitBreaker.sleepWindowInMilliseconds", value = "20000"),
    @HystrixProperty(name = "circuitBreaker.errorThresholdPercentage", value = "20000"),
    @HystrixProperty(name = "metrics.rollingStats.timeInMilliseconds", value = "20000"),
    }
    )
    )  

但我没有看到配置线程池属性的选项。 我检查了界面,但它没有:github link 有没有其他方法来指定它?

1 个答案:

答案 0 :(得分:0)

感谢您的提问。是的,我错过了这个属性。线程池属性已添加到@HystrixCommand。只需更新项目中的hystrix版本。