【问题标题】:HystrixCommand interface in hystrix-javanica annotation is missing ThreadPoolPropertieshystrix-javanica 注释中的 HystrixCommand 接口缺少 ThreadPoolProperties
【发布时间】:2014-12-19 17:01:23
【问题描述】:

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

【问题讨论】:

    标签: java aspectj netflix hystrix


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2017-09-13
      • 2018-09-16
      • 2016-11-01
      • 2017-01-15
      • 1970-01-01
      • 2013-09-17
      • 2010-09-18
      • 1970-01-01
      • 2019-06-03
      相关资源
      最近更新 更多