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 :
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 :
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
Remark : 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 !