0

我正在尝试将 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链接 有没有其他方法可以指定它?

4

1 回答 1

0

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

于 2015-01-11T08:25:57.753 回答