Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Cloud 系列(九)Hystrix源码中问答环节 dynamic.hystrix.command.timeout 不生效的问题 #8

Open
justintuition opened this issue Feb 4, 2019 · 0 comments

Comments

@justintuition
Copy link

justintuition commented Feb 4, 2019

调试了下源码,确实是小马哥说的缓存的问题,只不过是通过 HystrixCommandKey 检查缓存,不是 HystrixThreadPoolKey,估计是视频时间紧搞错了。另外,自定义 dynamic.hystrix.command.timeout 属性的方法实现较为繁琐,而官方文档 Configuration 其实已经提供了相应的属性设置:hystrix.command.xxx.execution.isolation.thread.timeoutInMilliseconds(“xxx” 就是 HystrixCommandKey.name()),我们只需设置和修改这个属性值即可。(两种方式的具体实现:https://github.com/justinstuition/0300_Spring_Cloud/tree/master/0712_springcloud_hystrix/05_hystrixcommand-timout-dynamicsetting/src

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant