James.Strachan wrote:
> 
> ...snip...
> 
> Sounds good :)
> 
> Are these services registered into the OSGi registry? If so you could
> use a listener to detect new services being deployed then go off and
> fetch the right mediation rules for that service etc?
> 
> There have been a few discussions on the camel lists before about
> attaching mediation/routing/remoting rules to services as they are
> registered in spring or OSGi; it might be nice to come up with a
> little framework in Camel we can reuse when folks want a more dynamic
> decoupling of the mediation from the services.
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

That is exactly what we do. The services are registered in the OSGi service
registry, the framework bundle tracks the services by interface exposed, and
then dynamically looks up and creates the message consumer and mediation.
The lookup just uses the OSGi cm service to look at the configuration of the
service that started, and pulls the appropriate information from there to
configure. For instance, it looks at the cm property names
"listener.concurrentConsumers", "maxConcurrentConsumers" to configure the
number of consumers in the DefaultMessageListenerContainer.

No reason it can't pull a mediation pipeline out of the config as well.
-- 
View this message in context: 
http://www.nabble.com/Dynamically-changing-routes-%28OSGi%29-tf4951904s22882.html#a14195847
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to