Configure @HystrixCommand passing variables.
See original GitHub issueGood morning,
I am using Hyxtrix to implement the Circuit Breaker design pattern. I would like to know how to pass the value using a variable or reading from Config Server
@HystrixCommand(
commandProperties = {
@HystrixProperty(
name="execution.isolation.thread.timeoutInMilliseconds",
value="500")
})
Idea 1:
@Value("${system1.timeout}")
String system1Timeout;
@HystrixCommand(
commandProperties = {
@HystrixProperty(
name="execution.isolation.thread.timeoutInMilliseconds",
value="system1Timeout")
})
This idea doesn’t work.
Idea 2:
@HystrixCommand(
commandProperties = {
@HystrixProperty(
name="execution.isolation.thread.timeoutInMilliseconds",
value="${system1.timeout}")
})
This idea doesn’t work.
Many thanks in advance.
Juan Antonio
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Hystrix Circuit Breaker — How To Set It Up Properly - Medium
When you apply circuit breaker concept with Hystrix into your source code you should set up appropriate values for these three key parameters:....
Read more >How to pass data from business method to fallback method ...
Passing input parameters data. Methods annotated with @HystrixCommand and the corresponding fallbackMethod need to have the same method ...
Read more >The Hystrix Parameters You Actually Need to Tune in Spring ...
Thread Pool Key. By default, hystrix will use the same threadpool for all configured HystrixCommands. This is very rarely what you want, because...
Read more >HystrixCommand (Hystrix Javadoc 1.5.3)
Fluent interface for arguments to the HystrixCommand constructor. ... Do not create multiple HystrixCommand implementations with the same HystrixCommandKey ...
Read more >Spring Cloud Netflix
To configure the @HystrixCommand you can use the commandProperties attribute ... in RequestContext , null will be passed as a parameter of choose...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The idea of issue was, how to configure parameters of a HyxtrixCommand outside of the usage.
I found a way:
http://stackoverflow.com/questions/31211685/configuring-hystrix-command-properties-using-application-yaml-in-spring-boot-app
cforce cforce@gmx.de schrieb am Fr., 22. Juli 2016 um 15:05 Uhr: