SlideShare una empresa de Scribd logo
1 de 25
Introduction
to
Apache camel
Problem Statement
Creating a single, big application to run a complete business
is next to impossible.
Enterprises are typically comprised of discrete applications.
• Custom built
• Acquired from 3rd party
• Legacy systems
• External systems
Integrating different applications to work together is a big
challenge.
Credit Services
Risk Management
Services
Direct Agents Internet
Business rules
Management systems
Rule
Repository
Compliance Policies Reporting
Back office
Loan Approval System
Solution
Enterprise Application Integration - EAI
Enterprise Application Integration is the use of software and
computer systems architectural principles to integrate a set
of enterprise software applications using Enterprise
Integration Patterns.
Available solutions
• Custom solution
• Enterprise Service Bus
• Mule ESB
• Service Mix ESB
• JBoss ESB
• Enterprise Integration Frameworks
• Spring Integration
• Apache Camel
What is Camel
Apache Camel is a Java based open-source integration
framework based on Enterprise Integration Patterns.
What is Camel cont.
Apache Camel allows your applications to accomplish
• Message routing between endpoints
• Message transformation
• Protocol mediation
Camel use the established Enterprise Integration Patterns
and out-of-the-box adapters with a highly expressive
Domain Specific Language (Java, Spring XML, Scala and
Groovy).
Why Apache Camel
• Routing and mediation engine
• Domain-specific language (DSL)
• Extensive component library
• Modular and pluggable architecture
• Easy configuration
• Conventions over configuration paradigm is followed.
• Automatic type converters
• Many built in type converters
• Data Format Converters
• Data Type Converters
• Create your own converters
Routing and Mediation Engine
• A routing engine moves the message around based on
the routing configuration.
• Routes are configured using DSL.
from(“step 1").to(“step 2");
• Camel route starts with “from” that act as a consumer.
• Once data is received by consumer
• A message will be created
• Message is transported to Camel route
Steps involves in message routing
• Message received by Consumer
• Message transformation
• Message format validation
• Enriching message contents
• Message splitting and aggregating
• Activity logging
Domain Specific Language (DSL)
Camel routes are created using a Domain Specific
Language (DSL), specifically tailored for application
integration.
Camel DSLs are:
• High-level languages
• Allow us to easily create routes
• Combining various processing steps
• No need for any low-level implementations
DSL Examples
• Java DSL
from("file:data/input").to("file:data/output");
• Spring DSL
<camel:route>
<camel:from uri="file:data/input?noop=true" />
<camel:to uri="file:data/output" />
</camel:route>
• Scala DSL
from "file:data/input" -> " file:data/output"
Extensive component library
Camel offers library of components that are modeled after
Enterprise Integration Patterns.
• Bean Component
• File Component
• JMS and ActiveMQ Component
• CXF Component
• Log component
• And many more…
Compete list of components can be found here.
http://camel.apache.org/components.html
Enterprise Integration Patterns
To help deal with the complexity of integration problems,
the Enterprise Integration Patterns
are the standard way to describe, document and implement
complex integration problems.
All integration patterns can be found in the book Enterprise
Integration Patterns by Gregor Hohpe and Bobby Woolf
published in January 2004.
Essential Integration Patterns
• Pipes and Filters
How to perform complex processing on a message while maintaining independence and
flexibility?
• Message Router
How to decouple individual processing steps so that messages can be passed to different
filters depending on a set of conditions?
• Message Translator
How can systems using different data formats communicate with each other using
messaging?
• Message Filter
How can a component avoid receiving unwanted messages?
Essential Integration Patterns cont.
• Splitter
How to split the message into pieces and process them individually.
• Aggregator
How to combine the results of individual, but related messages so that they can be
processed as a whole?
• Resequencer
How to get a stream of related but out-of-sequence messages back into the correct
order?
• Dead Letter Channel
What will the messaging system do with a message it cannot deliver?
How it works
• Camel Core
Contains all the functionality needed to run a Camel application—DSL for
various languages, the routing engine, implementations of EIPs, a
number of data converters, and core components.
• Camel Routes
A route represents a chain of processing steps applied to a message
based on some rules. The route has a beginning defined by the from
endpoint, and one or more processing steps commonly called
"Processors“.
• Camel Context
A dynamic multithread route container, responsible for managing all
aspects of the routing: route lifecycle, message conversions,
configurations, error handling, monitoring, and so on.
Message
A Message in Apache Camel is an implementation of
org.apache.camel Message interface.
Message has four main parts:
• UID
• Header
• Body
• Attachments
Message
Header
Attachment
body
Endpoint
Any producer or consumer in Camel route is an Endpoint.
Consider Camel route as a graph and Endpoint as a Node.
Exchange
A message container and link between producer and consumer
endpoints and hold information about:
• Producer and consumer endpoints
• Message route
• Protocol used
• Any error or exception thrown
Camel Message Routing
• Camel route starts with “from” that act as a consumer. Consumer can of the
following types:
• Polling consumer (fetches messages periodically)
• Event-Driven consumer (listens for events)
• Consumer receives a message from external system.
• Consumer wraps the message in a Camel specific format called Exchange
and starts routing between endpoints.
• Producers are identified by the keyword “to”. Once message received
Producer will:
• Converting exchanges
• Delivering them to other channels
Camel Message Routing
TOFROM
endpoint endpoint
event
pooling
Camel route
exchange
Camel routes using Java
In Java DSL, we create a route by extending RouteBuilder and overriding the
configure method.
public class SampleFileRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
from("file:data/input?noop=true")
.to("file:data/output");
}
}
Camel Context for Java DSL
final CamelContext camelContext = new DefaultCamelContext();
camelContext.addRoutes(new SampleFileRoute());
camelContext.start();
camelContext.stop();
Camel routes using Spring
In the Spring DSL, we create a route by using Spring configuration.
<camel:camelContext xmlns="http://camel.apache.org/schema/spring">
<camel:route>
<camel:from uri="file:data/input?noop=true" />
<camel:to uri="file:data/output" />
</camel:route>
</camel:camelContext>
Camel Context for Spring DSL
final AbstractApplicationContext springContext = new
ClassPathXmlApplicationContext(“camel-spring-context.xml");
springContext.start();
springContext.stop();
springContext.close();

Más contenido relacionado

La actualidad más candente

Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...confluent
 
Liferay overview
Liferay overviewLiferay overview
Liferay overviewAbhishekSRC
 
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014Claus Ibsen
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
Best Practices in Web Service Design
Best Practices in Web Service DesignBest Practices in Web Service Design
Best Practices in Web Service DesignLorna Mitchell
 
Using RAML 1.0 Like a Pro
Using RAML 1.0 Like a ProUsing RAML 1.0 Like a Pro
Using RAML 1.0 Like a ProMuleSoft
 
WebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck ThreadsWebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck ThreadsMaarten Smeets
 
Apache Kafka and MQTT - Overview, Comparison, Use Cases, Architectures
Apache Kafka and MQTT - Overview, Comparison, Use Cases, ArchitecturesApache Kafka and MQTT - Overview, Comparison, Use Cases, Architectures
Apache Kafka and MQTT - Overview, Comparison, Use Cases, ArchitecturesKai Wähner
 
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora - Benchmark ...
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora  - Benchmark ...The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora  - Benchmark ...
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora - Benchmark ...Symphony Software Foundation
 
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...Kai Wähner
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaAraf Karsh Hamid
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introductionShirish Bari
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache KafkaJeff Holoman
 
Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesAraf Karsh Hamid
 
OpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for BeginnersOpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for BeginnersSalesforce Developers
 

La actualidad más candente (20)

Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
 
Mule with rabbitmq
Mule with rabbitmqMule with rabbitmq
Mule with rabbitmq
 
Liferay overview
Liferay overviewLiferay overview
Liferay overview
 
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
 
Message Broker System and RabbitMQ
Message Broker System and RabbitMQMessage Broker System and RabbitMQ
Message Broker System and RabbitMQ
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Best Practices in Web Service Design
Best Practices in Web Service DesignBest Practices in Web Service Design
Best Practices in Web Service Design
 
Using RAML 1.0 Like a Pro
Using RAML 1.0 Like a ProUsing RAML 1.0 Like a Pro
Using RAML 1.0 Like a Pro
 
WebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck ThreadsWebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck Threads
 
Apache Kafka and MQTT - Overview, Comparison, Use Cases, Architectures
Apache Kafka and MQTT - Overview, Comparison, Use Cases, ArchitecturesApache Kafka and MQTT - Overview, Comparison, Use Cases, Architectures
Apache Kafka and MQTT - Overview, Comparison, Use Cases, Architectures
 
RabbitMQ
RabbitMQ RabbitMQ
RabbitMQ
 
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora - Benchmark ...
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora  - Benchmark ...The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora  - Benchmark ...
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora - Benchmark ...
 
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
 
WebSphere MQ tutorial
WebSphere MQ tutorialWebSphere MQ tutorial
WebSphere MQ tutorial
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introduction
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
 
OpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for BeginnersOpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for Beginners
 

Destacado

Xke - Introduction to Apache Camel
Xke - Introduction to Apache CamelXke - Introduction to Apache Camel
Xke - Introduction to Apache CamelAlexis Kinsella
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a RideBruce Snyder
 
Workshop apache camel
Workshop apache camelWorkshop apache camel
Workshop apache camelMarko Seifert
 
Integration made easy with Apache Camel
Integration made easy with Apache CamelIntegration made easy with Apache Camel
Integration made easy with Apache CamelRosen Spasov
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A RideBruce Snyder
 
«Spring Integration as Integration Patterns Provider»
«Spring Integration as Integration Patterns Provider»«Spring Integration as Integration Patterns Provider»
«Spring Integration as Integration Patterns Provider»IT Weekend
 
Apache Camel Lifecycle
Apache Camel LifecycleApache Camel Lifecycle
Apache Camel LifecycleIlya Lapitan
 
Wild Flies and a Camel Java EE Integration Stories
Wild Flies and a Camel Java EE Integration StoriesWild Flies and a Camel Java EE Integration Stories
Wild Flies and a Camel Java EE Integration StoriesMarkus Eisele
 
Apache Camel & The Art of Entreprise Integration
Apache Camel & The Art of Entreprise IntegrationApache Camel & The Art of Entreprise Integration
Apache Camel & The Art of Entreprise IntegrationAbdellatif BOUCHAMA
 
Apache Camel
Apache CamelApache Camel
Apache CamelGenevaJUG
 
Self Repairing Tree Topology Enabling Content Based Routing In Local Area Ne...
Self Repairing Tree Topology Enabling  Content Based Routing In Local Area Ne...Self Repairing Tree Topology Enabling  Content Based Routing In Local Area Ne...
Self Repairing Tree Topology Enabling Content Based Routing In Local Area Ne...ncct
 
Messaging with Spring Integration
Messaging with Spring IntegrationMessaging with Spring Integration
Messaging with Spring IntegrationVadim Mikhnevych
 
Spring Integration and EIP Introduction
Spring Integration and EIP IntroductionSpring Integration and EIP Introduction
Spring Integration and EIP IntroductionIwein Fuld
 
Elegant Systems Integration w/ Apache Camel
Elegant Systems Integration w/ Apache CamelElegant Systems Integration w/ Apache Camel
Elegant Systems Integration w/ Apache CamelPradeep Elankumaran
 
Consuming External Content and Enriching Content with Apache Camel
Consuming External Content and Enriching Content with Apache CamelConsuming External Content and Enriching Content with Apache Camel
Consuming External Content and Enriching Content with Apache Cameltherealgaston
 
Event Driven Architecture with Apache Camel
Event Driven Architecture with Apache CamelEvent Driven Architecture with Apache Camel
Event Driven Architecture with Apache Camelprajods
 
Apache Camel - The integration library
Apache Camel - The integration libraryApache Camel - The integration library
Apache Camel - The integration libraryClaus Ibsen
 

Destacado (20)

Xke - Introduction to Apache Camel
Xke - Introduction to Apache CamelXke - Introduction to Apache Camel
Xke - Introduction to Apache Camel
 
Cbr
CbrCbr
Cbr
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a Ride
 
Workshop apache camel
Workshop apache camelWorkshop apache camel
Workshop apache camel
 
Integration made easy with Apache Camel
Integration made easy with Apache CamelIntegration made easy with Apache Camel
Integration made easy with Apache Camel
 
Apache camel
Apache camelApache camel
Apache camel
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A Ride
 
«Spring Integration as Integration Patterns Provider»
«Spring Integration as Integration Patterns Provider»«Spring Integration as Integration Patterns Provider»
«Spring Integration as Integration Patterns Provider»
 
Apache Camel Lifecycle
Apache Camel LifecycleApache Camel Lifecycle
Apache Camel Lifecycle
 
Wild Flies and a Camel Java EE Integration Stories
Wild Flies and a Camel Java EE Integration StoriesWild Flies and a Camel Java EE Integration Stories
Wild Flies and a Camel Java EE Integration Stories
 
Apache Camel & The Art of Entreprise Integration
Apache Camel & The Art of Entreprise IntegrationApache Camel & The Art of Entreprise Integration
Apache Camel & The Art of Entreprise Integration
 
Apache Camel
Apache CamelApache Camel
Apache Camel
 
Self Repairing Tree Topology Enabling Content Based Routing In Local Area Ne...
Self Repairing Tree Topology Enabling  Content Based Routing In Local Area Ne...Self Repairing Tree Topology Enabling  Content Based Routing In Local Area Ne...
Self Repairing Tree Topology Enabling Content Based Routing In Local Area Ne...
 
Messaging with Spring Integration
Messaging with Spring IntegrationMessaging with Spring Integration
Messaging with Spring Integration
 
Spring Integration and EIP Introduction
Spring Integration and EIP IntroductionSpring Integration and EIP Introduction
Spring Integration and EIP Introduction
 
Elegant Systems Integration w/ Apache Camel
Elegant Systems Integration w/ Apache CamelElegant Systems Integration w/ Apache Camel
Elegant Systems Integration w/ Apache Camel
 
Consuming External Content and Enriching Content with Apache Camel
Consuming External Content and Enriching Content with Apache CamelConsuming External Content and Enriching Content with Apache Camel
Consuming External Content and Enriching Content with Apache Camel
 
Event Driven Architecture with Apache Camel
Event Driven Architecture with Apache CamelEvent Driven Architecture with Apache Camel
Event Driven Architecture with Apache Camel
 
Tml for Ruby on Rails
Tml for Ruby on RailsTml for Ruby on Rails
Tml for Ruby on Rails
 
Apache Camel - The integration library
Apache Camel - The integration libraryApache Camel - The integration library
Apache Camel - The integration library
 

Similar a An introduction to Apache Camel

Similar a An introduction to Apache Camel (20)

Introduction of Apache Camel
Introduction of Apache CamelIntroduction of Apache Camel
Introduction of Apache Camel
 
Mule esb and_relevant_components
Mule esb and_relevant_componentsMule esb and_relevant_components
Mule esb and_relevant_components
 
Integration Solution Patterns
Integration Solution Patterns Integration Solution Patterns
Integration Solution Patterns
 
Red Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseRed Hat Open Day JBoss Fuse
Red Hat Open Day JBoss Fuse
 
Srilekha mule esb
Srilekha mule esbSrilekha mule esb
Srilekha mule esb
 
Apache Camel interview Questions and Answers
Apache Camel interview Questions and AnswersApache Camel interview Questions and Answers
Apache Camel interview Questions and Answers
 
Mule overview-ppt
Mule overview-pptMule overview-ppt
Mule overview-ppt
 
Mule esb naveen
Mule esb naveenMule esb naveen
Mule esb naveen
 
Niranjan mule esb
Niranjan mule esbNiranjan mule esb
Niranjan mule esb
 
Mule overview
Mule overviewMule overview
Mule overview
 
EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
 
Mule esb kranthi
Mule esb kranthiMule esb kranthi
Mule esb kranthi
 
Mule esb kranthi
Mule esb kranthiMule esb kranthi
Mule esb kranthi
 
Mule esb
Mule esb Mule esb
Mule esb
 
Mule
MuleMule
Mule
 
Esb process
Esb processEsb process
Esb process
 
Mule
MuleMule
Mule
 
Sai mule esb batch
Sai mule esb batchSai mule esb batch
Sai mule esb batch
 
Ashok mule esb
Ashok mule esbAshok mule esb
Ashok mule esb
 
Mule slides
Mule slides Mule slides
Mule slides
 

Último

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

An introduction to Apache Camel

  • 2. Problem Statement Creating a single, big application to run a complete business is next to impossible. Enterprises are typically comprised of discrete applications. • Custom built • Acquired from 3rd party • Legacy systems • External systems Integrating different applications to work together is a big challenge.
  • 3. Credit Services Risk Management Services Direct Agents Internet Business rules Management systems Rule Repository Compliance Policies Reporting Back office Loan Approval System
  • 4. Solution Enterprise Application Integration - EAI Enterprise Application Integration is the use of software and computer systems architectural principles to integrate a set of enterprise software applications using Enterprise Integration Patterns.
  • 5. Available solutions • Custom solution • Enterprise Service Bus • Mule ESB • Service Mix ESB • JBoss ESB • Enterprise Integration Frameworks • Spring Integration • Apache Camel
  • 6. What is Camel Apache Camel is a Java based open-source integration framework based on Enterprise Integration Patterns.
  • 7. What is Camel cont. Apache Camel allows your applications to accomplish • Message routing between endpoints • Message transformation • Protocol mediation Camel use the established Enterprise Integration Patterns and out-of-the-box adapters with a highly expressive Domain Specific Language (Java, Spring XML, Scala and Groovy).
  • 8. Why Apache Camel • Routing and mediation engine • Domain-specific language (DSL) • Extensive component library • Modular and pluggable architecture • Easy configuration • Conventions over configuration paradigm is followed. • Automatic type converters • Many built in type converters • Data Format Converters • Data Type Converters • Create your own converters
  • 9. Routing and Mediation Engine • A routing engine moves the message around based on the routing configuration. • Routes are configured using DSL. from(“step 1").to(“step 2"); • Camel route starts with “from” that act as a consumer. • Once data is received by consumer • A message will be created • Message is transported to Camel route
  • 10. Steps involves in message routing • Message received by Consumer • Message transformation • Message format validation • Enriching message contents • Message splitting and aggregating • Activity logging
  • 11. Domain Specific Language (DSL) Camel routes are created using a Domain Specific Language (DSL), specifically tailored for application integration. Camel DSLs are: • High-level languages • Allow us to easily create routes • Combining various processing steps • No need for any low-level implementations
  • 12. DSL Examples • Java DSL from("file:data/input").to("file:data/output"); • Spring DSL <camel:route> <camel:from uri="file:data/input?noop=true" /> <camel:to uri="file:data/output" /> </camel:route> • Scala DSL from "file:data/input" -> " file:data/output"
  • 13. Extensive component library Camel offers library of components that are modeled after Enterprise Integration Patterns. • Bean Component • File Component • JMS and ActiveMQ Component • CXF Component • Log component • And many more… Compete list of components can be found here. http://camel.apache.org/components.html
  • 14. Enterprise Integration Patterns To help deal with the complexity of integration problems, the Enterprise Integration Patterns are the standard way to describe, document and implement complex integration problems. All integration patterns can be found in the book Enterprise Integration Patterns by Gregor Hohpe and Bobby Woolf published in January 2004.
  • 15. Essential Integration Patterns • Pipes and Filters How to perform complex processing on a message while maintaining independence and flexibility? • Message Router How to decouple individual processing steps so that messages can be passed to different filters depending on a set of conditions? • Message Translator How can systems using different data formats communicate with each other using messaging? • Message Filter How can a component avoid receiving unwanted messages?
  • 16. Essential Integration Patterns cont. • Splitter How to split the message into pieces and process them individually. • Aggregator How to combine the results of individual, but related messages so that they can be processed as a whole? • Resequencer How to get a stream of related but out-of-sequence messages back into the correct order? • Dead Letter Channel What will the messaging system do with a message it cannot deliver?
  • 17. How it works • Camel Core Contains all the functionality needed to run a Camel application—DSL for various languages, the routing engine, implementations of EIPs, a number of data converters, and core components. • Camel Routes A route represents a chain of processing steps applied to a message based on some rules. The route has a beginning defined by the from endpoint, and one or more processing steps commonly called "Processors“. • Camel Context A dynamic multithread route container, responsible for managing all aspects of the routing: route lifecycle, message conversions, configurations, error handling, monitoring, and so on.
  • 18. Message A Message in Apache Camel is an implementation of org.apache.camel Message interface. Message has four main parts: • UID • Header • Body • Attachments Message Header Attachment body
  • 19. Endpoint Any producer or consumer in Camel route is an Endpoint. Consider Camel route as a graph and Endpoint as a Node. Exchange A message container and link between producer and consumer endpoints and hold information about: • Producer and consumer endpoints • Message route • Protocol used • Any error or exception thrown
  • 20. Camel Message Routing • Camel route starts with “from” that act as a consumer. Consumer can of the following types: • Polling consumer (fetches messages periodically) • Event-Driven consumer (listens for events) • Consumer receives a message from external system. • Consumer wraps the message in a Camel specific format called Exchange and starts routing between endpoints. • Producers are identified by the keyword “to”. Once message received Producer will: • Converting exchanges • Delivering them to other channels
  • 21. Camel Message Routing TOFROM endpoint endpoint event pooling Camel route exchange
  • 22. Camel routes using Java In Java DSL, we create a route by extending RouteBuilder and overriding the configure method. public class SampleFileRoute extends RouteBuilder { @Override public void configure() throws Exception { from("file:data/input?noop=true") .to("file:data/output"); } }
  • 23. Camel Context for Java DSL final CamelContext camelContext = new DefaultCamelContext(); camelContext.addRoutes(new SampleFileRoute()); camelContext.start(); camelContext.stop();
  • 24. Camel routes using Spring In the Spring DSL, we create a route by using Spring configuration. <camel:camelContext xmlns="http://camel.apache.org/schema/spring"> <camel:route> <camel:from uri="file:data/input?noop=true" /> <camel:to uri="file:data/output" /> </camel:route> </camel:camelContext>
  • 25. Camel Context for Spring DSL final AbstractApplicationContext springContext = new ClassPathXmlApplicationContext(“camel-spring-context.xml"); springContext.start(); springContext.stop(); springContext.close();