Over a million developers have joined DZone.
Platinum Partner

Cloud Integration With Fabric Camel (Part I)

The Integration Zone is brought to you in partnership with 3scale. Discover why Rails + jspm >= ECMAScript 6 awesomeness.

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

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:
endpoints/local/00000000001 = jetty:
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

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 !

The Integration Zone is brought to you in partnership with 3scale. Learn how to deploy an NGINX API gateway on Heroku.


Published at DZone with permission of Charles Moulliard .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}