SlideShare a Scribd company logo
Enterprise Integration
Patterns
with
Apache Camel
Ioan Eugen Stan
20 Septembrie 2013
Axway Kickoff
● Why = The purpose - What is
you cause? What do you belive
in?
● How = The Process - specifc
actions taken to realize the Why
● What = The result - what do
you do, the result of Why. Proof.
TED, Simon Sinek, May 2010
Why do we need
integration?
A integra = include, a (se) îngloba, a (se)
încorpora, a (se) armoniza într-un tot.
Enterprise Integration Patterns with Apache Camel
Why EIP Where does complexity
come from?
Much of the complexity stems from two issues:
● dealing with the specifics of applications and
transports
● coming up with good solutions to integration
problems
The Book
● 65 design patterns
● Formalized language
● Covers:
○ Integration Styles
○ Messaging Systems
○ Message Construction
○ Message Routing
○ Message Transformation
○ Messaging Endpoints
○ System Management
EIPs in detail (1)
Message
Pipes and Filters
Message translator
Message router
Messaging Systems
EIPs in detail (2)
Point to Point channel
Publish Subscribe Channel
Dead letter queue
Guaranteed delivery
Messaging Channels
EIPs in detail (3)
Event message
Request reply
Correlation identifier
Return Address
Messaging Construction
EIPs in detail (4)
Content based router
Message filter
Dynamic router
Recipient list
Messaging Routing
EIPs in detail (5)
Splitter
Aggregator
Resequencer
Routing slip
Messaging Routing
EIPs in detail (6)
Content enricher
Content filter
Claim check
Normalizer
Messaging Transformation
EIPs in detail (7)
Event driven consumer
Pooling consumer
Transactional client
Service activator
Messaging Endpoints
EIPs in detail (8)
Control bus
Detour
Wire Tap
System Management
Flight Mash-up
Image from: http://appzdevelop.blogspot.ro/2012/02/apache-camel-flight-aggregation-mashup.html
Code: https://code.google.com/p/apache-camel-mashup/
Purchase example
Normalization
Transform multiple message types into a common format
Other examples
Apache Camel
● java framework for integration and mediation
● rules in multiple DSLs:
○ Fluent Java
○ Spring XML
○ Blueprint XML
○ Scala
● over > 150 out-of-box components
● bean binding and integration with popular
frameworks
● active comunity ~ 900 messages/month
Camel Architecture
Image from: http://java.dzone.com/articles/open-source-integration-apache (Camel in Action)
Basics
● create a CamelContext
● optionally configure components or
endpoints
● add routing rules
● start the context
Example Java DSL
Example Spring DSL
Vocabulary: Component & Endpoint
● Component is an Endpoint factory
● Enpoints are refered by URIs: file://, jms://
● Has methods:
○ createProducer()
○ createConsumer()
○ createPoolingConsumer()
(Some) Standard components
● AHC - Async HTTP client
● Atom
● AMPQ
● AWS-* - Amazon cloud services
● Bean - Bean binding
● DNS - DNS look-up
● Elasticsearch
● JPA
● File & FTP
● HBase
● HTTP
● LDAP
● MongoDB
● Mustache
● Netty
● POP3
● RabbitMQ
● Salesforce
● Servlet
● JMS & ActiveMQ
● SQL
● SSH
● Validation - XML validation
● Websocket
● XMPP
● Activiti BPMN
● Smooks
Vocabulary: Exchange
● Exchange = Wrapper object
● encapsulates Messages (IN and
OUT) and Metadata
● Java interface used to implement message consumers
or Message Translator EIP
● you can create a Component from a Processor
Camel Processor
Remember
Processing files with Apache Camel
Content Based Router EIP
Route messages to destination based on message contents
Content Based Router - Spring DSL
Normalizer EIP
Camel ETL - sample
● read files from src/data/ directory
● convert content to PersonDocument class using TypeConvertor system
(JAXB)
● persist to DB using JPA component using TypeConvertor
● read from DB with JPA component as entity class
● convert entity to XML file with JAXB and File component
Transactional Client EIP
Make client session with messaging system transactional
● uses Spring transactions
● Transactional endpoints: JMS, ActiveMQ, AMPQ, JPA
Camel also supports Transactional Routes
Transactional Client
Load Balancer Pattern
● delegate processing based on load
balancing policies
● out-of-the-box-policies:
○ Round robin
○ Random
○ Sticky
○ Topic
○ Failover
○ Weighted Round-robin
○ Weighted random
○ Custom
Load Balancer
Error Handling
Two distinct types:
● transactional
● non-transactional
Can configure policies like:
● message redelivery
● dead-letter queue
Error Handling - Try - Catch
Error Handling - Dead Letter Queue
● exceptions caught by Dead Letter Channel - which
decides either:
○ to redeliver
○ or send to dead letted queue
Camel BAM
● business activity monitoring framework
● monitor business processes across multiple exchanges
● works across different endpoints
For every purchase order created by A, B generates an invoice.
Flight Mash-up revisited
Tooling: Fuse IDE
● Eclipse based RedHat JBoss product
● build Camel routes graphically (Spring XML
DSL)
● import existing XML routes
● comes with pre-defined EIP building blocks
● view local and remote ActiveMq brokers,
Camel end-points and routes
● trace Camel routes at run-time
Fuse IDE - diagram view
Hawt.io - ultimate admin console
● lightweight html5 modular web-console
● open-source (JBoss Cumunity project)
● discovers what the JVM is running (JMX,
other) and exposes a web UI
● lots of plugins:
○ ActiveMQ - default console for 5.9.x
○ Camel - view/control routes
○ OSGi - view/control bundles
○ Karaf
○ JMX
○ …..
Hawt.io - view routes
Hawt.io - ActiveMQ - browse/send
Hawt.io - monitor
Hawt.io - inspect JMX
Conclusions
● Camel is awesome tehnology
● easy to get started
● very powerfull
● the comunity is great and helpful
Întrebări?
Resources
● http://camel.apache.org
● https://access.redhat.com/site/documentation/Fuse_ESB_Enterprise/
● http://www.eaipatterns.com/
● http://java.dzone.com/articles/open-source-integration-apache
● http://activemq.apache.org/
● http://hawt.io/
● http://fusesource.com/products/fuse-ide/
● https://code.google.com/p/apache-camel-mashup/
● http://appzdevelop.blogspot.ro/2012/02/apache-camel-flight-aggregation-
mashup.html
Contact
● stan.ieugen@gmail.com
● ieugen@apache.org
● http://github.com/ieugen/
● ro.linkedin.com/in/ieugen/

More Related Content

What's hot (20)

PDF
What Is ELK Stack | ELK Tutorial For Beginners | Elasticsearch Kibana | ELK S...
Edureka!
 
PPTX
Kafka and Avro with Confluent Schema Registry
Jean-Paul Azar
 
KEY
Big Data in Real-Time at Twitter
nkallen
 
PPTX
Data Engineering Efficiency @ Netflix - Strata 2017
Michelle Ufford
 
PDF
AWS ECS vs EKS
Norberto Enomoto
 
PPTX
Capture the Streams of Database Changes
confluent
 
PDF
Cluster-as-code. The Many Ways towards Kubernetes
QAware GmbH
 
PPTX
Data Lakehouse, Data Mesh, and Data Fabric (r2)
James Serra
 
PPTX
Kafka Tutorial - Introduction to Apache Kafka (Part 1)
Jean-Paul Azar
 
PDF
ksqlDB: A Stream-Relational Database System
confluent
 
PDF
A Thorough Comparison of Delta Lake, Iceberg and Hudi
Databricks
 
PDF
使用 Apache IoTDB 构建工业时序数据管理解决方案的实践
ZhangZhengming
 
PDF
Apache Pulsar Development 101 with Python
Timothy Spann
 
PDF
Introduction to Stream Processing
Guido Schmutz
 
PPTX
Migrating Data and Databases to Azure
Karen Lopez
 
PPTX
Centralized log-management-with-elastic-stack
Rich Lee
 
PPTX
Introduction to AWS Lake Formation.pptx
SwathiPonugumati
 
PPTX
Top Three Big Data Governance Issues and How Apache ATLAS resolves it for the...
DataWorks Summit/Hadoop Summit
 
PPTX
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Lucas Jellema
 
PPTX
Apache Hadoop Security - Ranger
Isheeta Sanghi
 
What Is ELK Stack | ELK Tutorial For Beginners | Elasticsearch Kibana | ELK S...
Edureka!
 
Kafka and Avro with Confluent Schema Registry
Jean-Paul Azar
 
Big Data in Real-Time at Twitter
nkallen
 
Data Engineering Efficiency @ Netflix - Strata 2017
Michelle Ufford
 
AWS ECS vs EKS
Norberto Enomoto
 
Capture the Streams of Database Changes
confluent
 
Cluster-as-code. The Many Ways towards Kubernetes
QAware GmbH
 
Data Lakehouse, Data Mesh, and Data Fabric (r2)
James Serra
 
Kafka Tutorial - Introduction to Apache Kafka (Part 1)
Jean-Paul Azar
 
ksqlDB: A Stream-Relational Database System
confluent
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
Databricks
 
使用 Apache IoTDB 构建工业时序数据管理解决方案的实践
ZhangZhengming
 
Apache Pulsar Development 101 with Python
Timothy Spann
 
Introduction to Stream Processing
Guido Schmutz
 
Migrating Data and Databases to Azure
Karen Lopez
 
Centralized log-management-with-elastic-stack
Rich Lee
 
Introduction to AWS Lake Formation.pptx
SwathiPonugumati
 
Top Three Big Data Governance Issues and How Apache ATLAS resolves it for the...
DataWorks Summit/Hadoop Summit
 
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Lucas Jellema
 
Apache Hadoop Security - Ranger
Isheeta Sanghi
 

Viewers also liked (20)

PDF
Apache Camel Introduction & What's in the box
Claus Ibsen
 
PDF
How to choose the right Integration Framework - Apache Camel (JBoss, Talend),...
Kai Wähner
 
PDF
Enterprise Integration Patterns
Johan Aludden
 
PPT
Showdown: Integration Framework (Spring Integration, Apache Camel) vs. Enterp...
Kai Wähner
 
PDF
Enterprise Integration Patterns Revisited (EIP, Apache Camel, Talend ESB)
Kai Wähner
 
PDF
Integration Patterns and Anti-Patterns for Microservices Architectures
Apcera
 
PPT
Java application server in the cloud
adm_exoplatform
 
PPTX
Tuning Java Servers
Srinath Perera
 
PDF
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
elliando dias
 
PPTX
Smart Enterprise Application Integration with Apache Camel
Kai Wähner
 
PDF
Scandev / SDC2013 - Spoilt for Choice: Which Integration Framework to use – A...
Kai Wähner
 
PDF
Gradle build automation tool
Ioan Eugen Stan
 
PDF
Employing Enterprise Application Integration (EAI)
elliando dias
 
PDF
System Integration with Akka and Apache Camel
krasserm
 
PDF
TS 4839 - Enterprise Integration Patterns in Practice
aegloff
 
PDF
Patterns for Enterprise Integration Success
WSO2
 
PDF
Enterprise Integration Patterns Revisited (EIP) for the Era of Big Data, Inte...
Kai Wähner
 
PPTX
Enterprise Integration Patterns
Sergey Podolsky
 
PDF
EIP In Practice
Bruce Snyder
 
PPT
Topic3 Enterprise Application Integration
sanjoysanyal
 
Apache Camel Introduction & What's in the box
Claus Ibsen
 
How to choose the right Integration Framework - Apache Camel (JBoss, Talend),...
Kai Wähner
 
Enterprise Integration Patterns
Johan Aludden
 
Showdown: Integration Framework (Spring Integration, Apache Camel) vs. Enterp...
Kai Wähner
 
Enterprise Integration Patterns Revisited (EIP, Apache Camel, Talend ESB)
Kai Wähner
 
Integration Patterns and Anti-Patterns for Microservices Architectures
Apcera
 
Java application server in the cloud
adm_exoplatform
 
Tuning Java Servers
Srinath Perera
 
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
elliando dias
 
Smart Enterprise Application Integration with Apache Camel
Kai Wähner
 
Scandev / SDC2013 - Spoilt for Choice: Which Integration Framework to use – A...
Kai Wähner
 
Gradle build automation tool
Ioan Eugen Stan
 
Employing Enterprise Application Integration (EAI)
elliando dias
 
System Integration with Akka and Apache Camel
krasserm
 
TS 4839 - Enterprise Integration Patterns in Practice
aegloff
 
Patterns for Enterprise Integration Success
WSO2
 
Enterprise Integration Patterns Revisited (EIP) for the Era of Big Data, Inte...
Kai Wähner
 
Enterprise Integration Patterns
Sergey Podolsky
 
EIP In Practice
Bruce Snyder
 
Topic3 Enterprise Application Integration
sanjoysanyal
 
Ad

Similar to Enterprise Integration Patterns with Apache Camel (20)

PDF
Solving Enterprise Integration with Apache Camel
Christian Posta
 
PDF
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
José Román Martín Gil
 
PPT
Simplify your integrations with Apache Camel
Kenneth Peeples
 
PPTX
Apache Camel framework Presentation and selection of apache camel for various...
chetansharma041
 
ODP
Red Hat Open Day JBoss Fuse
Adrian Gigante
 
PDF
Introduction To Apache Camel
Knoldus Inc.
 
PPTX
Enterprise Integration Patterns and Apache Camel
Miloš Zubal
 
PPTX
Essential Camel Components
Christian Posta
 
PPT
An introduction to Apache Camel
Kapil Kumar
 
PDF
Introduction of Apache Camel
Knoldus Inc.
 
PDF
Simplify integrations-final-pdf
Christian Posta
 
PDF
Apache Camel Introduction
Claus Ibsen
 
PDF
Apache Camel - Stéphane Kay - April 2011
JUG Lausanne
 
PPTX
Integrating Microservices with Apache Camel
Christian Posta
 
ODP
01 apache camel-intro
RedpillLinpro
 
PDF
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Claus Ibsen
 
PDF
Event Driven Architecture with Apache Camel
prajods
 
PDF
Toulouse Java User Group
Emmanuel Vinel
 
ZIP
Elegant Systems Integration w/ Apache Camel
Pradeep Elankumaran
 
PDF
Apache Camel v3, Camel K and Camel Quarkus
Claus Ibsen
 
Solving Enterprise Integration with Apache Camel
Christian Posta
 
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
José Román Martín Gil
 
Simplify your integrations with Apache Camel
Kenneth Peeples
 
Apache Camel framework Presentation and selection of apache camel for various...
chetansharma041
 
Red Hat Open Day JBoss Fuse
Adrian Gigante
 
Introduction To Apache Camel
Knoldus Inc.
 
Enterprise Integration Patterns and Apache Camel
Miloš Zubal
 
Essential Camel Components
Christian Posta
 
An introduction to Apache Camel
Kapil Kumar
 
Introduction of Apache Camel
Knoldus Inc.
 
Simplify integrations-final-pdf
Christian Posta
 
Apache Camel Introduction
Claus Ibsen
 
Apache Camel - Stéphane Kay - April 2011
JUG Lausanne
 
Integrating Microservices with Apache Camel
Christian Posta
 
01 apache camel-intro
RedpillLinpro
 
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Claus Ibsen
 
Event Driven Architecture with Apache Camel
prajods
 
Toulouse Java User Group
Emmanuel Vinel
 
Elegant Systems Integration w/ Apache Camel
Pradeep Elankumaran
 
Apache Camel v3, Camel K and Camel Quarkus
Claus Ibsen
 
Ad

More from Ioan Eugen Stan (7)

PDF
Modern authentication in Sling with Openid Connect and Keycloak - Adapt.to 20...
Ioan Eugen Stan
 
PDF
Modular Java applications with OSGi on Apache Karaf
Ioan Eugen Stan
 
PDF
Hands on continouous delivery, I TAKE 2014
Ioan Eugen Stan
 
PDF
2013 java2 days web apps - a different angle
Ioan Eugen Stan
 
PDF
Bjug Spring Custom Namespaces by Vlad Untu
Ioan Eugen Stan
 
PDF
Apache james more than emails in the cloud
Ioan Eugen Stan
 
PDF
Javascript ui for rest services
Ioan Eugen Stan
 
Modern authentication in Sling with Openid Connect and Keycloak - Adapt.to 20...
Ioan Eugen Stan
 
Modular Java applications with OSGi on Apache Karaf
Ioan Eugen Stan
 
Hands on continouous delivery, I TAKE 2014
Ioan Eugen Stan
 
2013 java2 days web apps - a different angle
Ioan Eugen Stan
 
Bjug Spring Custom Namespaces by Vlad Untu
Ioan Eugen Stan
 
Apache james more than emails in the cloud
Ioan Eugen Stan
 
Javascript ui for rest services
Ioan Eugen Stan
 

Recently uploaded (20)

PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 

Enterprise Integration Patterns with Apache Camel

  • 1. Enterprise Integration Patterns with Apache Camel Ioan Eugen Stan 20 Septembrie 2013 Axway Kickoff
  • 2. ● Why = The purpose - What is you cause? What do you belive in? ● How = The Process - specifc actions taken to realize the Why ● What = The result - what do you do, the result of Why. Proof. TED, Simon Sinek, May 2010
  • 3. Why do we need integration? A integra = include, a (se) îngloba, a (se) încorpora, a (se) armoniza într-un tot.
  • 5. Why EIP Where does complexity come from? Much of the complexity stems from two issues: ● dealing with the specifics of applications and transports ● coming up with good solutions to integration problems
  • 6. The Book ● 65 design patterns ● Formalized language ● Covers: ○ Integration Styles ○ Messaging Systems ○ Message Construction ○ Message Routing ○ Message Transformation ○ Messaging Endpoints ○ System Management
  • 7. EIPs in detail (1) Message Pipes and Filters Message translator Message router Messaging Systems
  • 8. EIPs in detail (2) Point to Point channel Publish Subscribe Channel Dead letter queue Guaranteed delivery Messaging Channels
  • 9. EIPs in detail (3) Event message Request reply Correlation identifier Return Address Messaging Construction
  • 10. EIPs in detail (4) Content based router Message filter Dynamic router Recipient list Messaging Routing
  • 11. EIPs in detail (5) Splitter Aggregator Resequencer Routing slip Messaging Routing
  • 12. EIPs in detail (6) Content enricher Content filter Claim check Normalizer Messaging Transformation
  • 13. EIPs in detail (7) Event driven consumer Pooling consumer Transactional client Service activator Messaging Endpoints
  • 14. EIPs in detail (8) Control bus Detour Wire Tap System Management
  • 15. Flight Mash-up Image from: http://appzdevelop.blogspot.ro/2012/02/apache-camel-flight-aggregation-mashup.html Code: https://code.google.com/p/apache-camel-mashup/
  • 17. Normalization Transform multiple message types into a common format
  • 19. Apache Camel ● java framework for integration and mediation ● rules in multiple DSLs: ○ Fluent Java ○ Spring XML ○ Blueprint XML ○ Scala ● over > 150 out-of-box components ● bean binding and integration with popular frameworks ● active comunity ~ 900 messages/month
  • 20. Camel Architecture Image from: http://java.dzone.com/articles/open-source-integration-apache (Camel in Action)
  • 21. Basics ● create a CamelContext ● optionally configure components or endpoints ● add routing rules ● start the context
  • 24. Vocabulary: Component & Endpoint ● Component is an Endpoint factory ● Enpoints are refered by URIs: file://, jms:// ● Has methods: ○ createProducer() ○ createConsumer() ○ createPoolingConsumer()
  • 25. (Some) Standard components ● AHC - Async HTTP client ● Atom ● AMPQ ● AWS-* - Amazon cloud services ● Bean - Bean binding ● DNS - DNS look-up ● Elasticsearch ● JPA ● File & FTP ● HBase ● HTTP ● LDAP ● MongoDB ● Mustache ● Netty ● POP3 ● RabbitMQ ● Salesforce ● Servlet ● JMS & ActiveMQ ● SQL ● SSH ● Validation - XML validation ● Websocket ● XMPP ● Activiti BPMN ● Smooks
  • 26. Vocabulary: Exchange ● Exchange = Wrapper object ● encapsulates Messages (IN and OUT) and Metadata
  • 27. ● Java interface used to implement message consumers or Message Translator EIP ● you can create a Component from a Processor Camel Processor
  • 29. Content Based Router EIP Route messages to destination based on message contents
  • 30. Content Based Router - Spring DSL
  • 32. Camel ETL - sample ● read files from src/data/ directory ● convert content to PersonDocument class using TypeConvertor system (JAXB) ● persist to DB using JPA component using TypeConvertor ● read from DB with JPA component as entity class ● convert entity to XML file with JAXB and File component
  • 33. Transactional Client EIP Make client session with messaging system transactional ● uses Spring transactions ● Transactional endpoints: JMS, ActiveMQ, AMPQ, JPA Camel also supports Transactional Routes
  • 35. Load Balancer Pattern ● delegate processing based on load balancing policies ● out-of-the-box-policies: ○ Round robin ○ Random ○ Sticky ○ Topic ○ Failover ○ Weighted Round-robin ○ Weighted random ○ Custom
  • 37. Error Handling Two distinct types: ● transactional ● non-transactional Can configure policies like: ● message redelivery ● dead-letter queue
  • 38. Error Handling - Try - Catch
  • 39. Error Handling - Dead Letter Queue ● exceptions caught by Dead Letter Channel - which decides either: ○ to redeliver ○ or send to dead letted queue
  • 40. Camel BAM ● business activity monitoring framework ● monitor business processes across multiple exchanges ● works across different endpoints For every purchase order created by A, B generates an invoice.
  • 42. Tooling: Fuse IDE ● Eclipse based RedHat JBoss product ● build Camel routes graphically (Spring XML DSL) ● import existing XML routes ● comes with pre-defined EIP building blocks ● view local and remote ActiveMq brokers, Camel end-points and routes ● trace Camel routes at run-time
  • 43. Fuse IDE - diagram view
  • 44. Hawt.io - ultimate admin console ● lightweight html5 modular web-console ● open-source (JBoss Cumunity project) ● discovers what the JVM is running (JMX, other) and exposes a web UI ● lots of plugins: ○ ActiveMQ - default console for 5.9.x ○ Camel - view/control routes ○ OSGi - view/control bundles ○ Karaf ○ JMX ○ …..
  • 45. Hawt.io - view routes
  • 46. Hawt.io - ActiveMQ - browse/send
  • 49. Conclusions ● Camel is awesome tehnology ● easy to get started ● very powerfull ● the comunity is great and helpful
  • 51. Resources ● http://camel.apache.org ● https://access.redhat.com/site/documentation/Fuse_ESB_Enterprise/ ● http://www.eaipatterns.com/ ● http://java.dzone.com/articles/open-source-integration-apache ● http://activemq.apache.org/ ● http://hawt.io/ ● http://fusesource.com/products/fuse-ide/ ● https://code.google.com/p/apache-camel-mashup/ ● http://appzdevelop.blogspot.ro/2012/02/apache-camel-flight-aggregation- mashup.html
  • 52. Contact ● [email protected][email protected] http://github.com/ieugen/ ● ro.linkedin.com/in/ieugen/