Over a million developers have joined DZone.

Cloud Integration With Fabric Camel (Part I)

Learn how API management supports better integration in Achieving Enterprise Agility with Microservices and API Management, brought to you in partnership with 3scale

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

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 !

Unleash the power of your APIs with future-proof API management - Create your account and start your free trial today, brought to you in partnership with 3scale.

Topics:

Published at DZone with permission of Charles Moulliard. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}