Guest User

Untitled

a guest
Dec 10th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. @HystrixCommand(commandKey = MFO_SERVICE, fallbackMethod = "fallback")
  2.  
  3. @HystrixCommand(
  4. commandKey = MFO_SERVICE,
  5. commandProperties = {
  6. @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "1000"),
  7. @HystrixProperty(name = "metrics.rollingStats.timeInMilliseconds", value = "60000"),
  8. @HystrixProperty(name = "circuitBreaker.errorThresholdPercentage", value = "10"),
  9. @HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "50"),
  10. @HystrixProperty(name = "circuitBreaker.sleepWindowInMilliseconds", value = "60000")},
  11. fallbackMethod = "fallback")
  12.  
  13. @Component
  14. public class HystrixConfig {
  15.  
  16. @Value("${execution.isolation.thread.timeoutInMilliseconds}")
  17. private String timeoutInMilliseconds;
  18.  
  19.  
  20. @PostConstruct
  21. private void init() {
  22. ConfigurationManager.getConfigInstance().setProperty("propertyStringHere", timeoutInMilliseconds);
  23. }
  24. }
Add Comment
Please, Sign In to add comment