camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject [DISCUSS] - JMX - Enlisting MBeans only during starting routes
Date Fri, 04 Feb 2011 15:15:32 GMT

I might as well have an email afternoon. I have though of writing this
for a bit of time.

Camel supports JMX, by enlisting various mbeans in the registry such
as consumers, components, endpoints, routes, services, thread pools
and so forth.
This happens during creation of those resources on demand.

There is a couple of issues
- MBean eats a lot of memory
- There is no limitation
- We enlist on demand, also when dynamic endpoints/producers is
created, that could lead to eating too much memory
- Even temporary routes is enlisted
- Its all or nothing
- Unregistering from JMX only happen when a route is shutdown or Camel shutdown.

So I propose we change the model to
- Only enlist during starting a route. Eg all the services that is
being created during starting a route is enlisted, as they are used by
that given route.
- Dynamic endpoints, producers and whatnot which is created after the
route is not enlisted.
- Adding an option on route to dictate if it should enlist or not (eg
temporary or short lived routes, you may not want to enslist)

This would improve
- Memory consumption would be low as we only enlist "static" parts of the routs
- We can enlist producers again
- Users can control if a route should be enlisted or not

We could even add options to dictate which kind of mbeans you want enlisted
- consumers, producers, endpoints, routes, components

Maybe you just want routes, as all you want is to be able to
start/stop a given route.

Any thoughts?

Claus Ibsen
Twitter: davsclaus
Author of Camel in Action:

View raw message