Apache Camel provides performance monitoring out-of-the-box, by their generic JMX support and by a dedicated camel-metrics component.

The following example briefly describes how to set up performance monitoring for a IPF consumer route.

Simply add a Route Policy bean for each route which exposes route utilization statistics. You can also define a MetricsRoutePolicyFactory for monitoring all routes.

    ...
    <!-- use camel-metrics route policy to gather metrics -->
    <bean id="metricsRoutePolicy" class="org.apache.camel.component.metrics.routepolicy.MetricsRoutePolicy">
        <!-- fine grained monitoring -->
        <property name="useJmx" value="true"/>
        <property name="jmxDomain" value="org.openehealth.ipf.metrics"/>
    </bean>
    ...

Refer to the route policy in all route you wish to monitor:

    // Now this route is performance monitored
    from("pix-iti8:0.0.0.0:3700?secure=true")
        .routePolicyRef("metricsRoutePolicy")
        ...

Back to top

Version: 3.2-SNAPSHOT. Last Published: 2017-03-09.

Reflow Maven skin by Andrius Velykis.