Java Magazine, Sept/Oct 2018
ORACLE COM JAVAMAGAZINE SEPTEMBER OCTOBER 2018 50 the leading edge Listing 6 Configuring the stream servlet to get real time statistics @ Configuration public class HystrixStreamServletDefinition @ Bean name hystrixRegistrationBean public ServletRegistrationBean servletRegistrationBean ServletRegistrationBean registration new ServletRegistrationBean new HystrixMetricsStreamServlet hystrix stream registration setName hystrixServlet registration setLoadOnStartup 1 return registration Thats it Now I need to create a monitoring application I decided to keep my monitoring application as a separate service because I didnt want it to afect the performance of the holdings service In real life you would probably configure a similar service adding the right authentication and authorization and then let it monitor all your Hystrix streams in one place To start a standalone monitoring service you can download the entire setup but it is just as easy to create the service with Spring Boot To create it you need to have the following libraries in Spring Boot dependency groupId org springframework cloud groupId artifactId spring cloud starter hystrix dashboard artifactId version 145 RELEASE version dependency Listing 7 shows how I configured the monitoring application
You must have JavaScript enabled to view digital editions.