Hi

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
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to