camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpbarto <Jason.P.Ba...@gmail.com>
Subject Camel Integration Advice Needed
Date Tue, 18 Jun 2013 09:18:54 GMT
I have a custom code module which I would like to integrate with an AMQP
message bus.  In the past I've created (in another language) a messaging
broker which managed connections and subscriptions to the AMQP bus.  Now
creating the code in Java and having discovered Camel I'm trying to write
the code in a more flexible manner.  I love the XML route configuration of
Camel and the power and flexibility it provides - connect to AMQP today,
read from a file tomorrow, no code changed.  

My question is this, my custom code will need to be subscribed to various
AMQP routing keys (read topics) which are defined and changing at runtime. 
The way I see it I can approach this one of three ways: 
 1) recreate the MQ broker myself to manage the AMQP subscriptions, ditching
Camel, and losing out on all the flexibility afforded by Camel
 2) Use a route builder to add / subtract routes dynamically to a camel
context, leveraging to a certain extent the flexibility of Camel but
ultimately still hard coding the AMQP linkage (i.e. drop AMQP, adopt JMS
requires a code change)
 3) In the Camel XML define an AMQP connector that subscribes to all topics
('#' routing key) on a given exchange and let the receiving custom component
do the topic filtering

I had really hoped that there was a fourth 'template' type option whereby a
route template could be defined in XML that the custom component, using
Java, could then instantiate changing topic values in the template where
appropriate and adding it into the Camel context as a new route.  This would
mean that should AMQP be dropped for another integration component the XML
would be modified and the custom component would not need to be changed.

I am still new to Camel so I'm sure this is likely well trodden ground
however my googles are coming back with no satisfactory answer - can anyone
provide some guidance?

Sincerely,
Jason



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Integration-Advice-Needed-tp5734283.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message