December 2013
Intermediate to advanced
424 pages
9h 7m
English
Camel, by default, enables JMX for all routes and endpoints it creates by default. Sometimes, such as when you are performance testing Camel, you do not want any of the JMX metric-gathering to add any extra overhead, so you may want to disable JMX. In general, it is a good idea to leave JMX enabled, as you will find it useful to help diagnose any runtime issues.
This recipe shows you how to disable JMX.
The Java code for this recipe is located in the org.camelcookbook.monitoring.jmxdisable package. The Spring XML files are located under src/main/resources/META-INF/spring and prefixed with jmx-disable.
In the XML DSL, create a jmxAgent element within the camelContext element, and set disabled to true:
<camelContext ...
Read now
Unlock full access