You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mark <el...@gmail.com> on 2010/07/22 23:20:40 UTC

using a content router

I am interested in creating a content router in which I have message
sender "A" sending messages that get transformed and then routed to
two receivers.  I am new to camel and want to know how I can write
Routing rules and load them into ActiveMQ.  I read documentation on
setting up the routes, but not how to load the routes into ActiveMQ.
I don't want to use XML, I would rather write code to do this since
all the objects are custom to my project.

Any help on this would be greatly appreciated.

thanks

Re: using a content router

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You should start with reading this article to get familiar what Camel is
http://architects.dzone.com/articles/apache-camel-integration

Then check this getting started example which uses Java to define route
http://camel.apache.org/walk-through-an-example.html

You need to use a RouteBuilder as well to define your route in Java code.

AMQ comes with Camel out of the box, and there is a AMQ config file
which has Camel prepared.
You gotta find this file and then adjust it to use your Java route builder

See this page how to use the <routeBuilder ref="myBuilder"/>
http://camel.apache.org/spring.html

You then need to build your Java route builder as a .jar file and drop
it into the AMQ/lib folder.
Restart AMQ and it should pickup your route.

The ActiveMQ in Action book also contains some information how to use
Camel with AMQ.
If you are serious with AMQ then this book is highly recommended.
http://activemq.apache.org/books

And likewise for Camel we got some books as well
http://camel.apache.org/books.html



On Thu, Jul 22, 2010 at 11:20 PM, Mark <el...@gmail.com> wrote:
> I am interested in creating a content router in which I have message
> sender "A" sending messages that get transformed and then routed to
> two receivers.  I am new to camel and want to know how I can write
> Routing rules and load them into ActiveMQ.  I read documentation on
> setting up the routes, but not how to load the routes into ActiveMQ.
> I don't want to use XML, I would rather write code to do this since
> all the objects are custom to my project.
>
> Any help on this would be greatly appreciated.
>
> thanks
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus