5.7. JMX
JBoss EAP Cryostat 하위 시스템과 통합되는 Cryo stat 구성 요소를 통해 관리 지원을 제공할 수 있습니다.
CamelContext camelctx = contextFactory.createWildflyCamelContext(getClass().getClassLoader()); camelctx.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { String host = InetAddress.getLocalHost().getHostName(); from("jmx:platform?format=raw&objectDomain=org.apache.camel&key.context=" + host + "/system-context-1&key.type=routes&key.name=\"route1\"" + "&monitorType=counter&observedAttribute=ExchangesTotal&granularityPeriod=500"). to("direct:end"); } }); camelctx.start(); ConsumerTemplate consumer = camelctx.createConsumerTemplate(); MonitorNotification notifcation = consumer.receiveBody("direct:end", MonitorNotification.class); Assert.assertEquals("ExchangesTotal", notifcation.getObservedAttribute());