Enterprise Integration Zone is brought to you in partnership with:

Ir. Charles Moulliard is a Sr. FuseSource Architect - Consultant and Apache Committer with more than 18 years of expertise in design of solution based on J2EE / .NET technologies. As a Solution Architect, he has been involved in system integration of client projects in Financial and Banking world. The skills (Methodology, UML, RUP, Project Management - Prince2, Telecommunication, Network, Security, Web Development, Programming languages, RDBMS, Architecture - J2EE/SOA, Middleware) that he acquires during its career path have help him to address business, functional, security and infrastructure requirements and transpose them into operable and efficient solutions. He is also fascinated to train people on new emerging technologies like SOA, OSGI, J2EE and ESB and provide consultancy for FUSE clients. As an Apache Committer he contributes since several years on the projects Apache Camel, Karaf and ServiceMix and uses these technologies as standards for integration projects. He is the author of the Camel Bindy DataFormat. Charles has posted 8 posts at DZone. You can read more from them at their website. View Full User Profile

Cloud Integration with Fabric Camel (Part I)

07.09.2012
| 3843 views |
  • submit to reddit
Since the launch of Fuse ESB 7, Fuse MB 7 and in fact the official release of Fuse Fabric, Camel has moved in a new era called "Cloud Integration where machines, services are distributed everywhere.
FuseSource (which is now part of RedHat company) is the leader of "Integration Everywhere" has supported the development of the Fabric project to facilitate the creation of such integration project in the "cloud".

With Fabric, the information of the Camel endpoints are registered in a global registry which can be accessed by the different machines part of the cloud. This mechanism which is presented here

video

You Tube link of the video : http://www.youtube.com/watch?v=CO1WcTFivT0

requires some Fabric agents which are used to communicate with the registry (= Fabric ensemble). This ensemble is in fact a Zookeeper server which will contain configurations, profiles and of course services registered. When a Camel producer wants to publish a camel exchange, it will perform a lookup in the registry to find endpoints using as a key the name associated to a fabric group.
The endpoints available are returned as a list :


zk:list -r -d fabric/registry/camel
endpoints/local/00000000000 = jetty:http://0.0.0.0:9090/fabric
endpoints/local/00000000001 = jetty:http://0.0.0.0:9191/fabric


As Fabric agents which are deployed in Fabric containers can be added or removed dynamically according to the needs, this list is continuously refreshed. The endpoint registered could be of type Jetty, CXF, Mina, Netty, JMS as they are able to transport information from a machine to another using HTTP, JMS, TCP/IP ... protocols.
The other advantage of this mechanism is that the Camel producer when communicating with Fabric will use a internal loabalancer if more than one Camel route exposing the service has been deployed in several Fabric containers.

To deploy a Fabric Camel project, you just need to use some of the Fabric commands to create the profiles of the camel routes exposed as service and also used to consume the services. With such profiles, we can create Fabric containers and deploy the camel routes as the following video will show you

video

Youtube Link of the video : http://www.youtube.com/watch?v=RUg2rgY4BME

The code of the demo is available here : https://github.com/fusesource/fuse/tree/master/fabric/fabric-examples/fabric-camel-cluster-loadbalancing

Enjoy Cloud Integration Camel Rider !
Published at DZone with permission of its author, Charles Moulliard. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)