SlideShare a Scribd company logo
Solving Enterprise Integration
With
Apache Camel
Christian Posta
Principal Consultant and Architect

11/09/13
1
Agenda
• 
• 
• 
• 
• 

2

What is Integration?
What is Apache Camel
Why Apache Camel?
Example
Questions?
Your speaker
Christian Posta
Blog: http://christianposta.com/blog
Twitter: @christianposta
Email: christian@redhat.com
ceposta@apache.org

•  Principal Consultant and Architect at Red Hat (FuseSource)
•  Based in Phoenix, AZ
•  Committer on Apache Camel, ActiveMQ, Apollo
•  PMC on ActiveMQ
•  Author: Essential Camel Components DZone Refcard
3
What is Integration?

4

4
Integration?

5
Integration…

6
Just use one computer.
No integration needed.

7
Why is integration hard?
•  Off the shelf? Home Grown? Acquisition?
•  Platforms
•  Protocols / Data Formats
•  Data Formats
•  Timing
•  Organizational mismatch

8
Commercial Solutions?

9
Enterprise Service Bus?

10
Enterprise Service Bus…

11
Extract the heart of ESB
•  Protocol mediation
•  Routing
•  Transformation
•  EIPs
•  Start small, build up
•  Open Source
•  Community driven

12
Patterns FTW!
•  Common language!!!!!
•  Specific context
•  Forces at work
•  Concrete solution
•  Guidance
•  Other patterns…
•  65 patterns

13
What is Apache Camel?

14
14
Proud parents of Camel

15
Apache Camel
Apache Camel is an open-source,
light-weight, integration library.

Use Camel to integrate disparate systems
that speak different protocols and data formats
16
Why the name Camel?
•  Can carry more weight that other
beasts?

•  James fancied the cigarettes?
•  A horse designed by committee?
17

Concise
Application
Messaging
Exchange
Language
What is Apache Camel?
•  Light-weight integration library
•  Enterprise Integration Patterns
•  Components
•  Domain Specific Language
•  Routing and Mediation (like an ESB?)
•  Runs in any container (or stand alone)

18
Not an ESB…per-se…
•  An integration library
• 
• 
• 

Routing (content-based, dynamic, rules-engine…)
Mediation (xformations, protocols, wire transports…)
DSL

•  Can build an ESB (real ESB.. Not just box in the
middle)
•  Many options based on Camel!
• 
• 
• 
• 
19

Fuse ESB / JBoss Fuse
Apache ServiceMix (Karaf + Camel)
Talend, wso2, others…
Not tied to vendor lock-in and commercial licenses!
Quick Example

20
20
Quick Example

File System

21

Message Oriented Middleware
Quick Example

From A

22

Filter
message

Send to B
Quick Example

from(A)

23

filter(predicate)

to(B)
Quick Example

from(A)

24

.filter(isWidget)

.to(B)
Quick Example

isWidget = xpath(“/quote/product = ‘widget’”);
from(A) .filter(isWidget). to(B)

25
Using Camel

26
26
Very popular
•  Used at top companies in finance, shipping,
retail/e-retail, health care, airline
reservations, etc

•  FAA: http://fusesource.com/collateral/131
•  Sabre: http://fusesource.com/collateral/139
•  CERN: http://fusesource.com/collateral/103
27
Open source
•  Apache Software Foundation
•  ASL v 2.0 Licensed
•  Vibrant community
• 

• 

28

Jira, mailing list, github

Lots of contributions! Check out the components!
Pipes and Filters

•  Step by Step – “Processors” in Camel terminology
•  Complex processing – “Routes”
•  Flexible
•  Testing
•  Reuse

29
Camel Routes
•  Defined in Java, XML, Scala, Groovy
•  Step by step processing of a message:
•  Consumer – Listen for incoming message
•  Zero or more “filters” or Processors
•  Producer – Send outgoing message
•  Number of processing filters, or “Processors” in
Camel-speak
•  EIPs
•  Tranform, redirect, enrich
30
Domain Specific Language
•  Domain specific (integration)
•  Used to build and describe Camel Routes
•  Embedded within a general programming language
•  Java, Spring XML, Scala, Groovy
•  Take advantage of existing tools
•  Fluent builders (builder pattern…)
• 

31

from(“..”).enrich(“…”).filter(“..”).to(“…”);
Java DSL
public class OrderProcessorRouteBuilder extends RouteBuilder {	
	
@Override	
public void configure() throws Exception {	
	
from(“activemq:orders”)	
	.choice()	
.when(header(“customer-rating”).isEqualTo(“gold”))	
.to(“ibmmq:topic:specialCustomer”)	
.otherwise()	
.to(“ftp://user@host/orders/regularCustomers”)	
.end()	
.log(“received new order ${body.orderId}”)	
.to(“ibatis:storeOrder?statementType=Insert”);	
}	
}	
32
Spring XML DSL
<route id=“processOrders”>
<from uri=“activemq:orders”/>
<choice>
<when>
<simple>${header.customer-rating} == ‘gold’</simple>
<to uri=“ibmmq:topic:specialCustomer”>
</when>
<otherwise>
<to uri=“ftp://user@host/orders/regularCustomers” />
</otherwise>
</choice>
<log message=“received new order ${body.orderId}”/>
<to uri=“ibatis:storeOrder?statementType=Insert”/>
</route>	
33
Enterprise Integration Patterns
•  Message Routing
•  Transformation
•  Aggregation
•  Splitting
•  Resequencer
•  Routing Slip
•  Enricher
•  All from the book!
34
Components
•  Prepackaged bits of code
•  Highly configurable
•  Maximum interoperability
•  Used to build “Adapters” to existing systems
•  Don’t reinvent the wheel and end up with a box

35
Components
http://camel.apache.org/components.html
•  ActiveMQ, Websphere, Weblogic (JMS)
•  AMQP

•  HTTP

•  ATOM feeds

•  IRC

•  AWS (S3, SQS, SNS, others)

•  jclouds

•  Bean

•  JDBC

•  Cache (EHCache)

•  Jetty

•  CXF (JAX-WS, JAX-RS)

•  Twitter

•  EJB

•  MQTT

•  Drools

•  MyBatis

•  File

•  JPA

•  FTP

•  Spring Integration

•  Google App Engine

36

•  GMail

•  Spring Web Services

To see list of all
components!!
Components
•  URI format:
• 

scheme:localPart[?options]

• 

scheme: identifies the “component”

• 

localPart: specific to the component

• 

options: is a list of name-value pairs

•  Creates endpoints based on configuration
•  Route endpoint “factories”
•  Integrate with Camel Routes by creating producer/
consumer endpoints
37
Another Example
public class MyExampleRouteBuilder extends RouteBuilder {	
	
@Override	
public void configure() throws Exception {	
	
from(“aws-sqs://demo?defaultVisibilityTimeout=2”)	
	
	

}	

}	

38

	.setHeader(“type”).jsonpath(“$[‘type’]”)	
	.filter(simple(“${header.type} == ‘login’”)

	

	.to(“jms:quote”);
Test Framework
•  Powerful way to test your Camel routes
• 

http://camel.apache.org/mock.html

•  Uses Mocks
•  Mocks vs Stubs?
• 

http://martinfowler.com/articles/mocksArentStubs.html

•  Provides declarative testing mechanism
•  Declare
•  Test
•  Assert

39
Management with HawtIO
http://hawt.io

40
Developer Tooling Support
Fuse IDE

41
JBoss Fuse (aka Fuse ESB)

42
JBoss Fuse (aka Fuse ESB)

43
Live Demo
can be found here:
https://github.com/christian-posta/camel-sqs-example

44
44
Resources

45
45
Dzone Refcardz
REFCARDZ

•  Camel Essential Components
• 

http://refcardz.dzone.com/refcardz/essential-camel-components

•  Essential EIP with Apache Camel
• 

http://refcardz.dzone.com/refcardz/enterprise-integration

46
Apache Community
•  http://camel.apache.org
•  Mailing list: users@camel.apache.org
•  Nabble Archive:

http://camel.465427.n5.nabble.com/Camel-Users-f465428.html

•  Source code: http://svn.apache.org/viewvc/camel/trunk/
•  Blogs, Articles, Examples
• 

http://camel.apache.org/articles.html

• 

http://camel.apache.org/user-stories.html

• 

http://camel.apache.org/user-stories.html

• 

http://www.davsclaus.com

• 

http://www.christianposta.com/blog

47
Apache Camel Books

48
Apache Camel Books

49
Questions
50

More Related Content

What's hot

What's hot (20)

Microservices with Apache Camel, DDD, and Kubernetes
Microservices with Apache Camel, DDD, and KubernetesMicroservices with Apache Camel, DDD, and Kubernetes
Microservices with Apache Camel, DDD, and Kubernetes
 
DevNexus 2015
DevNexus 2015DevNexus 2015
DevNexus 2015
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache Camel
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQ
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
 
An evolution of application networking: service mesh
An evolution of application networking: service meshAn evolution of application networking: service mesh
An evolution of application networking: service mesh
 
Java one kubernetes, jenkins and microservices
Java one   kubernetes, jenkins and microservicesJava one   kubernetes, jenkins and microservices
Java one kubernetes, jenkins and microservices
 
Cloud Development with Camel and Amazon Web Services
Cloud Development with Camel and Amazon Web ServicesCloud Development with Camel and Amazon Web Services
Cloud Development with Camel and Amazon Web Services
 
Camel Based Development Application
Camel Based Development ApplicationCamel Based Development Application
Camel Based Development Application
 
Microservices and APIs
Microservices and APIsMicroservices and APIs
Microservices and APIs
 
The Hardest Part of Microservices: Calling Your Services
The Hardest Part of Microservices: Calling Your ServicesThe Hardest Part of Microservices: Calling Your Services
The Hardest Part of Microservices: Calling Your Services
 
Flexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesFlexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL Templates
 
Alfresco DevCon 2019 Performance Tools of the Trade
Alfresco DevCon 2019   Performance Tools of the TradeAlfresco DevCon 2019   Performance Tools of the Trade
Alfresco DevCon 2019 Performance Tools of the Trade
 
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
How Class Data Sharing Can Speed up Your Jakarta EE Application StartupHow Class Data Sharing Can Speed up Your Jakarta EE Application Startup
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
 
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
 
How would ESBs look like, if they were done today.
How would ESBs look like, if they were done today.How would ESBs look like, if they were done today.
How would ESBs look like, if they were done today.
 
Integrating Alfresco with SharePoint & Drupal Using CMIS
Integrating Alfresco with SharePoint & Drupal Using CMISIntegrating Alfresco with SharePoint & Drupal Using CMIS
Integrating Alfresco with SharePoint & Drupal Using CMIS
 
Real World Rails Deployment
Real World Rails DeploymentReal World Rails Deployment
Real World Rails Deployment
 
JavaEE Microservices platforms
JavaEE Microservices platformsJavaEE Microservices platforms
JavaEE Microservices platforms
 
MVC 6 - the new unified Web programming model
MVC 6 - the new unified Web programming modelMVC 6 - the new unified Web programming model
MVC 6 - the new unified Web programming model
 

Similar to Solving Enterprise Integration with Apache Camel

01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferay
daveayan
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
Markus Eisele
 
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
WSO2 Intro Webinar -  Simplifying Enterprise Integration with Configurable WS...WSO2 Intro Webinar -  Simplifying Enterprise Integration with Configurable WS...
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
WSO2
 

Similar to Solving Enterprise Integration with Apache Camel (20)

Simplify your integrations with Apache Camel
Simplify your integrations with Apache CamelSimplify your integrations with Apache Camel
Simplify your integrations with Apache Camel
 
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
 
S2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchS2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring Batch
 
Integration in the age of DevOps
Integration in the age of DevOpsIntegration in the age of DevOps
Integration in the age of DevOps
 
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftReal world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShift
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferay
 
Apache Camel Introduction
Apache Camel IntroductionApache Camel Introduction
Apache Camel Introduction
 
TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practice
 
A microservices journey - Round 2
A microservices journey - Round 2A microservices journey - Round 2
A microservices journey - Round 2
 
Be faster then rabbits
Be faster then rabbitsBe faster then rabbits
Be faster then rabbits
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
WSO2 Intro Webinar -  Simplifying Enterprise Integration with Configurable WS...WSO2 Intro Webinar -  Simplifying Enterprise Integration with Configurable WS...
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
 
Cloud Native Camel Riding
Cloud Native Camel RidingCloud Native Camel Riding
Cloud Native Camel Riding
 
SPSDenver - Wrapping Your Head Around the SharePoint Beast
SPSDenver - Wrapping Your Head Around the SharePoint BeastSPSDenver - Wrapping Your Head Around the SharePoint Beast
SPSDenver - Wrapping Your Head Around the SharePoint Beast
 
EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
 
Succeding with the Apache SOA stack
Succeding with the Apache SOA stackSucceding with the Apache SOA stack
Succeding with the Apache SOA stack
 
Restful风格ž„web服务架构
Restful风格ž„web服务架构Restful风格ž„web服务架构
Restful风格ž„web服务架构
 
Apache Arrow: Leveling Up the Analytics Stack
Apache Arrow: Leveling Up the Analytics StackApache Arrow: Leveling Up the Analytics Stack
Apache Arrow: Leveling Up the Analytics Stack
 
Drupal Introduction - Why enterprises should use it
Drupal Introduction - Why enterprises should use itDrupal Introduction - Why enterprises should use it
Drupal Introduction - Why enterprises should use it
 
TechBeats #2
TechBeats #2TechBeats #2
TechBeats #2
 

More from Christian Posta

Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)
Christian Posta
 
Role of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoptionRole of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoption
Christian Posta
 
API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisis
Christian Posta
 

More from Christian Posta (20)

Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Understanding Wireguard, TLS and Workload Identity
Understanding Wireguard, TLS and Workload IdentityUnderstanding Wireguard, TLS and Workload Identity
Understanding Wireguard, TLS and Workload Identity
 
Compliance and Zero Trust Ambient Mesh
Compliance and Zero Trust Ambient MeshCompliance and Zero Trust Ambient Mesh
Compliance and Zero Trust Ambient Mesh
 
Cilium + Istio with Gloo Mesh
Cilium + Istio with Gloo MeshCilium + Istio with Gloo Mesh
Cilium + Istio with Gloo Mesh
 
Multi-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMeshMulti-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMesh
 
Multicluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh PatternsMulticluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh Patterns
 
Cloud-Native Application Debugging with Envoy and Service Mesh
Cloud-Native Application Debugging with Envoy and Service MeshCloud-Native Application Debugging with Envoy and Service Mesh
Cloud-Native Application Debugging with Envoy and Service Mesh
 
Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)
 
The Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneThe Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data Plane
 
Deep Dive: Building external auth plugins for Gloo Enterprise
Deep Dive: Building external auth plugins for Gloo EnterpriseDeep Dive: Building external auth plugins for Gloo Enterprise
Deep Dive: Building external auth plugins for Gloo Enterprise
 
Role of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoptionRole of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoption
 
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdNavigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
 
Chaos Debugging for Microservices
Chaos Debugging for MicroservicesChaos Debugging for Microservices
Chaos Debugging for Microservices
 
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
 
Service-mesh options with Linkerd, Consul, Istio and AWS AppMesh
Service-mesh options with Linkerd, Consul, Istio and AWS AppMeshService-mesh options with Linkerd, Consul, Istio and AWS AppMesh
Service-mesh options with Linkerd, Consul, Istio and AWS AppMesh
 
Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1
 
API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisis
 
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
 
PHX DevOps Days: Service Mesh Landscape
PHX DevOps Days: Service Mesh LandscapePHX DevOps Days: Service Mesh Landscape
PHX DevOps Days: Service Mesh Landscape
 
Intro to Knative
Intro to KnativeIntro to Knative
Intro to Knative
 

Recently uploaded

Recently uploaded (20)

WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.
 
Transforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UXTransforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UX
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Motion for AI: Creating Empathy in Technology
Motion for AI: Creating Empathy in TechnologyMotion for AI: Creating Empathy in Technology
Motion for AI: Creating Empathy in Technology
 
Server-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at PricelineServer-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at Priceline
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 

Solving Enterprise Integration with Apache Camel

  • 1. Solving Enterprise Integration With Apache Camel Christian Posta Principal Consultant and Architect 11/09/13 1
  • 2. Agenda •  •  •  •  •  2 What is Integration? What is Apache Camel Why Apache Camel? Example Questions?
  • 3. Your speaker Christian Posta Blog: http://christianposta.com/blog Twitter: @christianposta Email: christian@redhat.com ceposta@apache.org •  Principal Consultant and Architect at Red Hat (FuseSource) •  Based in Phoenix, AZ •  Committer on Apache Camel, ActiveMQ, Apollo •  PMC on ActiveMQ •  Author: Essential Camel Components DZone Refcard 3
  • 7. Just use one computer. No integration needed. 7
  • 8. Why is integration hard? •  Off the shelf? Home Grown? Acquisition? •  Platforms •  Protocols / Data Formats •  Data Formats •  Timing •  Organizational mismatch 8
  • 12. Extract the heart of ESB •  Protocol mediation •  Routing •  Transformation •  EIPs •  Start small, build up •  Open Source •  Community driven 12
  • 13. Patterns FTW! •  Common language!!!!! •  Specific context •  Forces at work •  Concrete solution •  Guidance •  Other patterns… •  65 patterns 13
  • 14. What is Apache Camel? 14 14
  • 15. Proud parents of Camel 15
  • 16. Apache Camel Apache Camel is an open-source, light-weight, integration library. Use Camel to integrate disparate systems that speak different protocols and data formats 16
  • 17. Why the name Camel? •  Can carry more weight that other beasts? •  James fancied the cigarettes? •  A horse designed by committee? 17 Concise Application Messaging Exchange Language
  • 18. What is Apache Camel? •  Light-weight integration library •  Enterprise Integration Patterns •  Components •  Domain Specific Language •  Routing and Mediation (like an ESB?) •  Runs in any container (or stand alone) 18
  • 19. Not an ESB…per-se… •  An integration library •  •  •  Routing (content-based, dynamic, rules-engine…) Mediation (xformations, protocols, wire transports…) DSL •  Can build an ESB (real ESB.. Not just box in the middle) •  Many options based on Camel! •  •  •  •  19 Fuse ESB / JBoss Fuse Apache ServiceMix (Karaf + Camel) Talend, wso2, others… Not tied to vendor lock-in and commercial licenses!
  • 25. Quick Example isWidget = xpath(“/quote/product = ‘widget’”); from(A) .filter(isWidget). to(B) 25
  • 27. Very popular •  Used at top companies in finance, shipping, retail/e-retail, health care, airline reservations, etc •  FAA: http://fusesource.com/collateral/131 •  Sabre: http://fusesource.com/collateral/139 •  CERN: http://fusesource.com/collateral/103 27
  • 28. Open source •  Apache Software Foundation •  ASL v 2.0 Licensed •  Vibrant community •  •  28 Jira, mailing list, github Lots of contributions! Check out the components!
  • 29. Pipes and Filters •  Step by Step – “Processors” in Camel terminology •  Complex processing – “Routes” •  Flexible •  Testing •  Reuse 29
  • 30. Camel Routes •  Defined in Java, XML, Scala, Groovy •  Step by step processing of a message: •  Consumer – Listen for incoming message •  Zero or more “filters” or Processors •  Producer – Send outgoing message •  Number of processing filters, or “Processors” in Camel-speak •  EIPs •  Tranform, redirect, enrich 30
  • 31. Domain Specific Language •  Domain specific (integration) •  Used to build and describe Camel Routes •  Embedded within a general programming language •  Java, Spring XML, Scala, Groovy •  Take advantage of existing tools •  Fluent builders (builder pattern…) •  31 from(“..”).enrich(“…”).filter(“..”).to(“…”);
  • 32. Java DSL public class OrderProcessorRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(“activemq:orders”) .choice() .when(header(“customer-rating”).isEqualTo(“gold”)) .to(“ibmmq:topic:specialCustomer”) .otherwise() .to(“ftp://user@host/orders/regularCustomers”) .end() .log(“received new order ${body.orderId}”) .to(“ibatis:storeOrder?statementType=Insert”); } } 32
  • 33. Spring XML DSL <route id=“processOrders”> <from uri=“activemq:orders”/> <choice> <when> <simple>${header.customer-rating} == ‘gold’</simple> <to uri=“ibmmq:topic:specialCustomer”> </when> <otherwise> <to uri=“ftp://user@host/orders/regularCustomers” /> </otherwise> </choice> <log message=“received new order ${body.orderId}”/> <to uri=“ibatis:storeOrder?statementType=Insert”/> </route> 33
  • 34. Enterprise Integration Patterns •  Message Routing •  Transformation •  Aggregation •  Splitting •  Resequencer •  Routing Slip •  Enricher •  All from the book! 34
  • 35. Components •  Prepackaged bits of code •  Highly configurable •  Maximum interoperability •  Used to build “Adapters” to existing systems •  Don’t reinvent the wheel and end up with a box 35
  • 36. Components http://camel.apache.org/components.html •  ActiveMQ, Websphere, Weblogic (JMS) •  AMQP •  HTTP •  ATOM feeds •  IRC •  AWS (S3, SQS, SNS, others) •  jclouds •  Bean •  JDBC •  Cache (EHCache) •  Jetty •  CXF (JAX-WS, JAX-RS) •  Twitter •  EJB •  MQTT •  Drools •  MyBatis •  File •  JPA •  FTP •  Spring Integration •  Google App Engine 36 •  GMail •  Spring Web Services To see list of all components!!
  • 37. Components •  URI format: •  scheme:localPart[?options] •  scheme: identifies the “component” •  localPart: specific to the component •  options: is a list of name-value pairs •  Creates endpoints based on configuration •  Route endpoint “factories” •  Integrate with Camel Routes by creating producer/ consumer endpoints 37
  • 38. Another Example public class MyExampleRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(“aws-sqs://demo?defaultVisibilityTimeout=2”) } } 38 .setHeader(“type”).jsonpath(“$[‘type’]”) .filter(simple(“${header.type} == ‘login’”) .to(“jms:quote”);
  • 39. Test Framework •  Powerful way to test your Camel routes •  http://camel.apache.org/mock.html •  Uses Mocks •  Mocks vs Stubs? •  http://martinfowler.com/articles/mocksArentStubs.html •  Provides declarative testing mechanism •  Declare •  Test •  Assert 39
  • 42. JBoss Fuse (aka Fuse ESB) 42
  • 43. JBoss Fuse (aka Fuse ESB) 43
  • 44. Live Demo can be found here: https://github.com/christian-posta/camel-sqs-example 44 44
  • 46. Dzone Refcardz REFCARDZ •  Camel Essential Components •  http://refcardz.dzone.com/refcardz/essential-camel-components •  Essential EIP with Apache Camel •  http://refcardz.dzone.com/refcardz/enterprise-integration 46
  • 47. Apache Community •  http://camel.apache.org •  Mailing list: users@camel.apache.org •  Nabble Archive: http://camel.465427.n5.nabble.com/Camel-Users-f465428.html •  Source code: http://svn.apache.org/viewvc/camel/trunk/ •  Blogs, Articles, Examples •  http://camel.apache.org/articles.html •  http://camel.apache.org/user-stories.html •  http://camel.apache.org/user-stories.html •  http://www.davsclaus.com •  http://www.christianposta.com/blog 47