First, Introduction
The hystrix provides almost real-time monitoring. When executed, Hystrixcommand and Hystrixobserv-ablecommand generate execution results and run metrics, such as the number of requests executed per second, number of successes, and so on, which are useful for analyzing the state of the application system.
Using the Hystrix module hystrix-metrics-event-stream, these monitored metrics information can be exposed to the external system in a Text/event-stream format. Spring-cloud-starter-hystrix already contains this module, on this basis, only need to add spring-boot-starter-actuator for the project, you can use/ The Hystrix.stream endpoint gets hystrix monitoring information.
Our previous project Spring-hystrix-consumer included Spring-cloud-starter-hystrix, spring-boot-starter-actuator, boot access:/HTTP After LOCALHOST:8086/USER/1, then visit: Http://localhost:8086/manage/hystrix.stream, will repeat the following:
Second, the implementation of the operation
This article is from "I Love Big gold" blog, please be sure to keep this source http://1754966750.blog.51cto.com/7455444/1949857
Springcloud (12): Using Hystrix to implement fault-tolerant processing of microservices-hystrix monitoring