You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

JMX Component Example

Available as of Camel 2.6

This is a new example we added in Camel 2.1 as a little example of the new and overhauled JMX Management we did.

The example is included in the distribution at examples/camel-example-jmx. It contains a README.txt file with details how to use and run it.

The routes

This example has 2 routes:
1. A route that calls a update method on an MBean every 5th second. This is done using a timer endpoint.
2. A route that monitors the MBean using the jmx-component. When the first route fires it causes the MBean to update and send out a notification
event. This route subscribes to that MBean and receives any JMX notification events. Events are then just sent to the log endpoint.

The idea and a plan

Usage

You can use maven to run the example using

mvn camel:run

It takes about 10 second before Camel logs to the screen the first time. Its should be like this

 

See Also

  • No labels