ServiceMix and Camel expose a lot of information through jmx mbeans. You can use jconsole to access this information.
Start jconsole and connect to a running servicemix instance. Look for the entry with karaf in the name:
In the mbeans tab you’ll find a node for Apache Camel. Here you’ll find all your routes, endpoints, services and processors:
You can name your routes using the id
method, this makes it easier to
find it in jconsole:
public class TestRouteBuilder extends RouteBuilder {
public void configure() throws Exception {
from("file:///tmp/testin").id("fileToLogRoute").to("log:filereceived?showAll=true");
}
}
THe attributes section shows you a lot of information about the exchanges that have been handled by the route, for example number of exchanges completed, number of failed exchanges. It also shows you the status of a route.
The methods sections enables you to start and stop a route: