Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Souravraj_Maitra
Explorer
1,369

I am excited to share my insights on Apache Camel Framework that, I hope, will be of use to those who are new to this. It enables integration of various system, applications and data sources to enable smooth flow of information by wrapping the message into a container called Exchange. Below I will be giving description of each component used in the Apache camel framework diagram followed by step-by-step explanation of how the message transfer takes place along with a diagram:

Camel Framework_Souravraj Maitra.png

 Components:

  1. Message: It's used to incorporate the data to be transferred. Its has 3 parts:
    1. Header: It's used to send metadata like routing information, API Keys, etc.
    2. Body: Contains the data to be transferred.
    3. Attachment:  Used to attach optional files or binary data to be transferred.
  2. Adapters: It's used to handle the entry and exit points of an integration flow. You can say it acts as a bridge between message and integration flow. They are of 2 types:
    1. Inbound Adapter: It acts as an entry point for message. It incorporates the message into a container called Exchange.
    2. Outbound Adapter: It acts as an exit point for message. It extracts message from Exchange.
  3. Exchange: It acts as a container for the message during the entire routing to the Consumer/Receiver. Structure of the Exchange is as follows:
    1. Exchange ID: It's the Identifier to uniquely identify each Exchange.
    2. MEP (Message Exchange Pattern): It's used to specify whether the message transfer is synchronous or asynchronous. Below is the detailed explanation for each:
      • Synchronous: In this case sender will be expecting will be expecting for a response and there will be 2 message bodies: In-message (for request) and Out-message (for response).
      • Asynchronous: In this sender won't be expecting any response and there will be only one message body: In-Message.
    3. Exception: Used to log any error that occurs during processing.
    4. Property: used to temporarily the values that were fetched, hardcoded or parameterized. The values stored in Properties are accessible within the integration flow.
    5. In-message: It's the original message.
    6. Out-message: It's the response we get in synchronous message transfer.

Message flow step wise explanation:

Step 1: Message from sender is incorporated into Exchange by Inbound Adapter and transferred into the Integration flow.

Step 2: Necessary processing is done to the Message embedded in Exchange in the integration flow.

Step 3: The processed message is extracted by Outbound Adapter and sent to the receiver.

As for the examples, you can follow this links where I have mentioned about the use cases:

Hope you like it.

#btp cpi #camel-framework

@Bibekananda1231 

@Ankit_Kanungo 

@Mukul_Varshney