If you are starting with Apache Camel as a developer, these slides will help you. These slides has some thoughts on how a new developer can approach the features of camel and build applications on top of it.
1. Are you new to Apache
Camel ?
GNANAGURU SATTANATHAN
HTTP://WWW.BUSHORN.COM
2. What to expect ?
I am working with Camel for the past 5 years, looking back I am able to
visualize how Camel has grown so far and how I have adopted it myself.
I am seeing many new organizations adopting Camel in their
infrastructure, so as many developers starting to learn it.
If you are just out of college, a decade experienced Java developer or a
engineer from some other background like .Net, Php, Silicon fabrication,
civil engineering,… these slides will help you on the way learning camel.
3. Beauty of Integration
Before jumping to Camel, Are you someone interested in learning
something new all the time ? Then welcome to Integration world
Integration technologies can integrate literally anything where computers
are involved.
Integrate Railways to Banks, Banks to Banks, Metrology to News station,
Utility companies to Houses etc.. As they vary in domain, each one of
them uses different technologies, and they are getting integrated.
Like many other integration technologies, Apache Camel is one of them.
A popular, simple, well performing integration framework.
You have got more than 170 components in it, So you can learn one every
month :)
4. Expect Simplicity
Customer requirement Camel implementation
We are trying to integrate
our centralized file server
with our partners message
broker system
<from uri="ftp://host:port/path" />
<to uri="jms:queue:PartnerA" />
Don’t start imagining writing 1000 lines of code, You
can do integration in few lines of code. Well, there
can be super complex use cases, then there are
going to be few more from and to's
5. Perception checkpoint
Apache Camel can be any of these
Integration Framework
Integration Tool
Integration Product
Java implementation (If you have already done so much with Java)
Open Source Integration product
Middleware
Something built on top of JVM
Whatever it is, Predominantly your code is going to have only 'from'
and 'To' endpoints
6. Do you have Java background ?
Camel is a open source integration framework. Open source always gives
you flexibility and of course Camel is built using Java. So it can be feast for
many Java fans.
With Java knowledge you can build a better and sophisticated Camel
application.
But If you know how a Java class looks like and how to run a Java code ?
Then you have already satisfied the prerequisite. You can perceive camel
as a product and start the implementation. Java expertise is no blocker for
starting Camel development.
7. The difference
Camel
Java
Java
Camel
+
+
• To build a complete Camel application,
Java is indispensable. At least it is required for
writing unit test cases.
• Camel developers have already written
thousands of lines of code, to make it simple
and easy. Always see if you can complete
the use case with what Camel provides.
Rather than trying to extend the functionality
using Java. Most of the enterprise use cases
can be implemented just with the
capabilities of Camel.
8. Flexibility can be a overkill
Open source products provides flexibility. You can extend or customize the
products based on your enterprise needs.
Also there is no one best practice to use these products.
Utilizing flexibility is always good, but there is no point in writing a custom
code if the framework already provides the same feature.
For eg: You can write a simple 'to' endpoint for sending a message to a
JMS queue. OR you can call a processor, inside the processor you use a
producer template for sending messages to a JMS queue.
Refer examples and tutorials, pick the easiest one to implement. That
would most likely be a straight forward camel code.
9. Camel unit testing is awesome
Camel has wonderful unit testing support. Especially adviseWith and mock
endpoints.
Try writing unit test cases for every processor involved in a route, alteast
write them for every route in your camel context. Every simple xpath in a
route matters, a simple change would impact your complete flow, so
cover unit tests for every xpaths, setHeaders, Choice, etc.
Actually the flexibility aspect can be very useful for unit testing the routes.
Route builders, Producer templates, Mock endpoints, use all of them if you
want ;)
10. Ask Questions
Camel became very popular because of its community of users and
developers. By the time scratching your head, you can parallelly post your
questions to Camel Nabble or Stackoverflow(apache-camel).
Or maybe someone asked these questions already, search through these
forums and google. There are plenty of articles on Camel already.
11. That’s it for now !
These are some of my thoughts. It's been a wonderful journey with Camel
so far.
Some find it hard with Camel, Sometimes it is because of its simplicity. We
won't easily trust something if it sounds so simple isn't it ?
12. I can try to help if you have any questions, I contribute articles to
http://bushorn.com and drop your comments there.
Or you can contact me through LinkedIn or Twitter
https://www.google.com.au/search?q=gnanaguru+sattanathan