[英]Disable Circuit Breaker (Hystrix) in Zuul for specific spring profiles?
We have several negative test cases that we run as part of our integration suite. 作为集成套件的一部分,我们有几个负面的测试案例。 These cases have a nasty habit of apparently tripping the
hystrix
circuit breaker and disabling servers that are delivering expected bad responses. 这些案例有一种令人讨厌的习惯,即显然绊倒了
hystrix
断路器并禁用了提供预期不良响应的服务器。
I'd like to configure the spring profile in Zuul
to disable the circuit breaker in our test environment. 我想在
Zuul
配置弹簧轮廓以在我们的测试环境中禁用断路器。
I had attempted to use 我试图使用
hystrix.command.default.circuitBreaker.enabled: false
It looks like it may work if I define this for each possible hystrix command key (which I haven't dug into how to find yet). 如果我为每个可能的hystrix命令键定义了此命令,则它似乎可以工作(我还没有研究如何找到它)。 Assuming this would be the correct configuration, is there a way to wildcard it, or otherwise just turn off hystrix for certain spring profiles?
假设这是正确的配置,是否有通配符的方法,或者只是针对某些弹簧轮廓关闭了hystrix?
I'm not familiar with Zuul
but you can use Hystrix ConfigurationManager
for tuning your parameters. 我不熟悉
Zuul
但您可以使用Hystrix ConfigurationManager
来调整参数。
ConfigurationManager.getConfigInstance()
.setProperty("hystrix.command.default.circuitBreaker.enabled", false);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.