Hystrix经过一个回调函数保护服务调用。git
@Component public class StoreIntegration { @HystrixCommand(fallbackMethod = "defaultStores") public Object getStores(Map<String, Object> parameters) { //do stuff that might fail } public Object defaultStores(Map<String, Object> parameters) { return /* something useful */; } }
为了有效监控服务调用状态,可经过Hystrix Dashboard进行服务状态监控。github
Hystrix Dashboardspring