camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ext2" <>
Subject How about to support dynamic configurations in camel?
Date Wed, 08 Dec 2010 06:31:53 GMT
	Changing the configuration dynamically at runtime to adjust the
behavior of application is a use-full feature for many application.
	Camel support some dynamic mechanism now, etc: dynamic-routing
pattern; but I still encounter some limits while using camel. For example:
1)how could I dynamic change the behavior of a user custom bean? 2)How could
I dynamic change the behavior of the from endpoint and camel's processor?
etc: a filter's  condition , changing the transaction's default time-out.
3)dynamic create  a  new endpoint is not always needed, when we doesn’t
really need dynamic routing , but just change a special behavior of endpoint
at runtime: ex. change a waiting timeout when calling a webservice;

	For these requirements, we(camel) could resolve them by custom
solution for each situation. But if camel support some common mechanism to
support this, things will be better;
	While we using osgi with Apache Karaf, a basic dynamic configuration
mechanism is already in-place; That is:  OSGI Configuration Admin Service
and configuration property file deploying (Apache Karaf support it to
mapping hot  deployed property files to osgi configurations).
	So I am wondering if camel support this , dynamic configuration will
be simplified; Maybe the usage will looks like as following:
	1) user could write a property file as configuration: key will be
mapped to Camel component(even endpoint)'s and user bean's property based on
a  simple rule。the value will be mapping to the property's value; 
	I am not sure about the rule about how to mapp the key to property.
So I using a simplified rule to illustrate my thought: property file's key =
bean-id + "." + property-name.(this rule has a limit that it cannot mapping
property to endpoint).
	2) While starting camel,  camel will register a listener service for
the osgi dynamic configuration. At runtime , while the listener received
dynamic changed configuration , it will mapping the value to camel
component, endpoint, or user custom bean's property.
	3) Endpoint, Bean(also Camel  Component) must implements a
dynamic-configurable interface to say "I can be configured dynamically".
	Actually, in my own application, I have extend such a feature based
on spring(it somewhat  like spring's property override ). But it's limited,
and can not configure endpoint dynamically; Also I must changed some source
code of camel component to support my requirement.
	As the dynamic configuration requirement is very important for my
application, I think it maybe useful for the others. So I post it here;

	Finally, dynamic-configuration requirement is not limited in OSGI.
In the other situation, people should extend their own
dynamic-configuration-detecting mechanism, and integrate it with camel;

Thanks for any suggestion;
Best Regards

View raw message