Before writing Camel applications we first need to understand the architecture. How Camel manages integrating such heterogeneous components seamlessly. Once we can answer to this question then we will be comfortable enough to write a Camel application.
The important components which build a camel applications are:-
Please go through the diagram which i have taken from the Camel official documentation website.It clearly explains where each component fit itself. As you can see  there are three big blocks.
Each block contains information about different component. So,here the block with big “Camel Integration Engine And Router” is the context which interacts with other 2 blocks (components and processors).
So, the main job of a CamelContext is to manager all the components together. Then what is Component ? Camel after all is an integration and mediation engine which means that it has to talk with different types of components and protocols like -tcp,http,database,ftp,file system .So the components are the abstraction of each protocols. Eg:- to connect to the file system Camel has exposed “file” component. if we want to interact with the file system simply we need to use the file component.
Then comes the processor.As we know Camel is a framework which is based on the famous enterprise integration patterns ( for more info :- ), so processors are the parts which
expose the EIP design patterns and intermediate processing in between routes. Eg: there is an EIP called Message Translator Pattern.To accomplish this in Camel there are so many ways we can do using processors. So,basically processors are meant for in between route processing. Processing can be anything like – transformation , content enrichment, meditation and so on.We will see in detail about the processors in the upcoming sections.
Then comes the endpoint.Endpoints are basically the detailed path or address where you want your message to be routed.Lets say i have a use case where i need to get the file from one input directory and put it in an output directory. In this case my route will be like of the form  from(“file:input”).to(“file:output”) .
okay let’s dissect the above expression.
We will have a very clear understanding once we start writing programs.
For more information:-
There is an excellent book by   Gregor Hohpe and Bobby Woolf. I suggest everyone to buy this book and read it once. It  will give the best solutions and principles in EIP.
Hope that helps.. Happy Learning :)

Related Post

Leave a Comment

Your email address will not be published. Required fields are marked *

Menu Title