About Christian Posta
So I’ve recently re-kindled my interest in how Apache Camel works. Camel is such a powerful integration tool and is very widely used, but anytime I put it to work, I can’t help but think “well, how the hell does it do all that!!” … guess I just have knack for not just accepting that it’s wonderful.. I want to know why.
If you’ve followed some of my posts in the past, you’ll remember I do have a blog post that dives into how the Camel DSL API works. More specifically, how can you just magically type “from(..)” “choice(..)” “simple(..)” etc and the DSL is just smart enough to know what you mean and how to string everything together. If you’re interested in how that all works, please take a peak at that post. Be forewarned, there is a couple UML class diagrams in there that are quite verbose and long.
So if you recall from the previous post, the DSL (whether it’s the Java DSL, or XML, or Scala, or any others) has a very specific role. It helps the author of the integration route express very clearly his/her intent and then build that into an abstraction called a RouteDefinition. The RouteDefinition is kind of the “blueprint” of your route, and knows about all of your processors, EIPs, and components. You can consider any time you call from(..) to be the start of a new RouteDefinition. The rest of the route gives it its shape. So for every
Source : http://www.javacodegeeks.com/2013/08/from-inside-the-code-camel-routing-engine-part-i.html