SlideShare a Scribd company logo
1 of 41
1© 2018 Rogue Wave Software, Inc. All Rights Reserved. 1
Making Camel Work
for You
• Justin Reock
• Sr. Director and Lead Architect
• Rogue Wave OSS Support
2© 2018 Rogue Wave Software, Inc. All Rights Reserved. 2
Who’s speaking to me?
3© 2018 Rogue Wave Software, Inc. All Rights Reserved. 3
Justin Reock
• Sr. Director and Lead Architect of our OSS Support Team
• Way too much experience with ActiveMQ and Camel
• Developed our formal instructor-led training
• Numerous professional services and training engagements
• Early adopter of JMS and Camel
• Major FL/OSS evangelist!
4© 2018 Rogue Wave Software, Inc. All Rights Reserved. 4
What are we going to solve?
5© 2018 Rogue Wave Software, Inc. All Rights Reserved. 5
Quick exercise…
• I’m going to show you three slides
• They all have something in common….
• See if you can figure out what it is!
6© 2018 Rogue Wave Software, Inc. All Rights Reserved. 6
The Chupacabra…
7© 2018 Rogue Wave Software, Inc. All Rights Reserved. 7
A magical unicorn…
8© 2018 Rogue Wave Software, Inc. All Rights Reserved. 8
BillingFulfillment
CRME-Commerce
A homogeneous enterprise
landscape…
9© 2018 Rogue Wave Software, Inc. All Rights Reserved. 9
Answer
 None of these things exist in real life!
10© 2018 Rogue Wave Software, Inc. All Rights Reserved. 10
A Word on ESBs
• An Enterprise Service Bus is an architectural design pattern that
focuses on providing federation between systems using a common
runtime
• Ideally, a Service Bus will provide loosely coupled endpoints to which
various, heterogeneous systems can communicate with one another via
their native frameworks
• So, for instance, a .NET SOAP-driven application should be able to send
data along the bus, which could be received by, say, a Java-based JMS
destination
• The ESB will provide payload and protocol normalization to facilitate
that communication
• Loose coupling will ensure that services can remain unaware of
federated services’ languages and frameworks
11© 2018 Rogue Wave Software, Inc. All Rights Reserved. 11
Examples of ESBs
12© 2018 Rogue Wave Software, Inc. All Rights Reserved. 12
Common Enterprise Architecture Problems
• No Universal Rules and Routing
– Many application frameworks and protocols exist, but they are
fragmented
– They may use different protocols, data formats, and remote
communication methods
• Need for scale
– Business tend to grow their infrastructure and federate more systems
– As they do, the need for better scalability presents itself
• Heterogeneous clients
– Server frameworks aside, the application layer also tends to be highly
fragmented
– You will no doubt have applications in different languages that have a
need to communicate with one another
13© 2018 Rogue Wave Software, Inc. All Rights Reserved. 13
Common problems with ESBs
• Custom Adapters
– When not using something like SOAP, often there is a need to customize
an ESB client to fit into a particular framework
– This refutes an ESB’s notion of loose coupling and platform agnosticism
• Non-standard implementations
– Often an ESB provider will implement a protocol “their way” which can be
problematic for more standard platforms
• Disorganized Dependencies
– With all of the various transports, frameworks, and protocols an ESB
should be capable of delivering, our dependency libraries can get messy
• Deployment Governance
– And with so many developers contributing to an organization’s ESB logic,
controlling all of that deployment creates its own set of challenges
14© 2018 Rogue Wave Software, Inc. All Rights Reserved. 14
But isn’t Camel an ESB?
• No! Camel can form an essential part of an ESB, like it does in the
Apache Servicemix product
• But it is a standalone normalized messaging framework
• Camel is an example of one part of a Message Oriented Middleware
system
• It provides a routing and choreographing framework for moving data
around an enterprise
• Message Oriented Middleware often consists of several different platforms
orchestrating in concert
15© 2018 Rogue Wave Software, Inc. All Rights Reserved. 15
But isn’t Camel an ESB?
• No! Camel can form an essential part of an ESB, like it does in the
Apache Servicemix product
• But it is a standalone normalized messaging framework
• Camel is an example of one part of a Message Oriented Middleware
system
• It provides a routing and choreographing framework for moving data
around an enterprise
• Message Oriented Middleware often consists of several different platforms
orchestrating in concert
16© 2018 Rogue Wave Software, Inc. All Rights Reserved. 16
Message oriented middleware
• Technically, MOM is any platform that sends and receives messages
between distributed applications
• This allows for asynchronous processing, and normalization of data
exchanges
• Clients connect to a messaging provider, and send and receive
messages via that provider
17© 2018 Rogue Wave Software, Inc. All Rights Reserved. 17
What’s it good for?
• Data normalization makes it a lot easier for disparate applications to
trade information
• Just like in web services, heterogeneous systems can agree on a data
“contract” and send and receive data in that format
• All the application needs is a client compatible with the messaging
provider
• And since messages are allowed to queue up on the message provider,
it also makes it very easy to perform asynchronous processing
• Most message providers offer additional benefits, like guaranteed
delivery, options for traffic shaping, high availability, and scaling
18© 2018 Rogue Wave Software, Inc. All Rights Reserved. 18
What is Camel?
19© 2018 Rogue Wave Software, Inc. All Rights Reserved. 19
The repetitive world of integration
• So, data routing and transformation in the Enterprise lends itself to a lot of what
you would call “boilerplate” code
• Boilerplate text, in publishing, is text that can be used and reused in many
places
• Boilerplate code is the same concept
• How many times have you written code to open up a web server, push a file to
an ftp site or drop a message into a message broker?
• Have you ever felt that you’re just writing different versions of the same thing
over and over again?
• You’re not alone
• Enter the concept of an Enterprise Integration Pattern…
20© 2018 Rogue Wave Software, Inc. All Rights Reserved. 20
What’s Camel?
• Camel is an open source MOM language developed by Apache and based
on Enterprise Integration Patterns
• Book by Gregor Hohpe and Bobby Woolf
• Centers around 60+ common patterns found
in Enterprise integration projects
• Defines these common patterns in a vendor
neutral way
• Camel aims to provide a language which
implements these patterns, in a style
modeled after the UNIX pipeline
21© 2018 Rogue Wave Software, Inc. All Rights Reserved. 21
Project notes
• Camel is maintained by the Apache Camel community
• It is a top-level project hosted at http://camel.apache.org
• The project’s chief maintainer is Claus Ibsen, author of Camel in Action
• As of August of 2017, the project has had almost 400 distinct committers,
spanning over 30,000 commits
• It is written primarily in Java, and also contains some Scala code
• The project is licensed under the ALv2 (Apache License v2.0), which is
considered a permissive license
• So, Camel has been folded in to many other projects, including the Mule ESB
and the Switchyard project
• Camel can be run standalone, packaged into a WAR, or deployed as an OSGI
bundle
• A POJO syntax as well as a Spring DSL XML syntax are made available for
developers
22© 2018 Rogue Wave Software, Inc. All Rights Reserved. 22
Integration patterns
• Content Based Router
– Where a message is routed to disparate endpoints based on message criteria
23© 2018 Rogue Wave Software, Inc. All Rights Reserved. 23
Integration patterns
• Content Enricher
– In which a basic message enters the pattern, takes data from another
source, and then adds it to the message
24© 2018 Rogue Wave Software, Inc. All Rights Reserved. 24
Integration patterns
• Recipient List
– A message is broadcast to n channels based on message criteria. When this message
is broadcast to all channels regardless, it becomes a Multicast pattern
25© 2018 Rogue Wave Software, Inc. All Rights Reserved. 25
Integration patterns
• Scatter-Gather
– In which messages are broadcast out to disparate endpoints and results are
aggregated into a single message
26© 2018 Rogue Wave Software, Inc. All Rights Reserved. 26
How does it work?
• Camel uses a repeatable, normalized concatenation of “Processor” and
”Message” objects in a group called an Exchange
• There is an ”In” message, a “Processor”, and an “Out” message
Processor
In Out
27© 2018 Rogue Wave Software, Inc. All Rights Reserved. 27
How does it work?
• And, you can chain these Exchanges together – just like piping commands
through UNIX – and form a Camel Route
• The “Out” message of a previous Exchange becomes the “In” message of a
new Exchange:
P
In Out
P
In Out
P
In Out
28© 2018 Rogue Wave Software, Inc. All Rights Reserved. 28
Camel magic
• Now here’s the magical part – a Processor can be anything you want
• Components in Camel work by creating Processors that perform various
business functions
• The components can be chained together to build Integration Patterns
• For instance, you can have an “FTP” processor that takes the In message
and initiates an FTP session
• Or you can have an “SMTP” processor that takes the In message and
sends an email with it
• This is in addition to Camel’s many built-in patterns, such as LoadBalance,
Multicast, DataSets, etc.
• And there are a lot of components:
http://camel.apache.org/components.html
29© 2018 Rogue Wave Software, Inc. All Rights Reserved. 29
Camel components
Uhm, yeah, the list isn’t gonna fit…
The point is there are a lot!
30© 2018 Rogue Wave Software, Inc. All Rights Reserved. 30
Embedded scripting languages
• Camel also contains a number of embedded script languages that can be
used for various purposes
• Simple: The Simple query language can be used to introspect message
headers, payloads, and properties, and is useful when routing messages
based on their content
• Xpath: The XPath query language will let you traverse XML structures
and query for attribute and entity values, which is great for routing
messages based on their XML content
• JSONPath: Just like XPath, except for JSON-structured messages
• Groovy: The Groovy scripting language can be used for more advanced
data introspection and manipulation
• JavaScript: Yes, you can do entire processors in JavaScript
31© 2018 Rogue Wave Software, Inc. All Rights Reserved. 31
Camel source
• Camel routes can be coded in Java POJO
• Or by using Camel Spring DSL XML files
from("activemq:foo").filter().
xquery("//foo").
to("activemq:bar")
<route xmlns="http://camel.apache.org/schema/spring" id="TimerClient">
<from uri=”activemq:topic:broadcastData"/>
<setBody>
<constant>This is a test JMS message.</constant>
</setBody>
<to uri="activemq:Test_ActiveMQ_Route.inQueue"/>
</route>
32© 2018 Rogue Wave Software, Inc. All Rights Reserved. 32
Camel deployment
• Camel can be deployed in a number of ways:
• It can be deployed as a Java Web App using Spring or POJO
• Standalone Camel routes can also be deployed using Maven and Camel
• Spring Boot can launch Camel routes
• Camel can be embedded within another Java application
• Or within a Java-based container such as Jetty, Tomcat, JBoss/Wildfly, and
others
• ActiveMQ contains the Camel core libraries and can launch and deploy
Camel routes
• And OSGI containers like Karaf or its Servicemix counterpart can launch
Camel routes
• Standalone Camel routes scale very nicely in microservice containers as
well
33© 2018 Rogue Wave Software, Inc. All Rights Reserved. 33
Camel development
• Major IDEs like Eclipse and IntelliJ can ease Camel development by
allowing routes to execute within the IDE
• As of Camel 2.16, comprehensive in-line tools are available which allow
auto-completion and even list every parameter of an available component
34© 2018 Rogue Wave Software, Inc. All Rights Reserved. 34
Camel development
• But HawtIO is my current favorite way to prototype with Camel
• HawtIO allows for visual debugging of routes, tracing of message
lifecycle, diagram driven development, as well as monitoring
35© 2018 Rogue Wave Software, Inc. All Rights Reserved. 35
Camel monitoring
• Camel has a robust set of JMX instrumentation beans which can be
looked at to gain more information on the route
• Any JMX-capable enterprise monitoring solution will be a good fit for
Camel
36© 2018 Rogue Wave Software, Inc. All Rights Reserved. 36
So Camel is pretty awesome…
• Camel provides many benefits for enterprise messaging applications
• It comes with a free library of over a hundred integration components, as well
as a powerful framework for creating your own components
• Camel routes can be visually debugged, similar to jBPM or BPEL
• Camel cuts down on boilerplate code enormously, by providing Spring-based
integration components for popular applications and frameworks
• Camel is FOSS under Apache 2.0 License
• As Camel improves its underlying Spring libraries, you can take advantage of
better functionality with very little if any development effort
• Camel’s syntax is very easy to understand and provides a low learning curve
for developers
37© 2018 Rogue Wave Software, Inc. All Rights Reserved. 37
Demo: Content based router
• In this example, we will be using a very simple content based router
• In fact, we’ll be using the Simple query language to introspect a JMS
header in a message, and routing it to a destination based on the contents
of that header
• We will use Camel deployed directly into ActiveMQ, and we’ll write it from
scratch against a clean ActiveMQ install
38© 2018 Rogue Wave Software, Inc. All Rights Reserved. 38
Demo: File content translator
• Here we will read the contents of new files entering into a file directory, and
convert these files into JMS messages
39© 2018 Rogue Wave Software, Inc. All Rights Reserved. 39
Demo: JMS to JMS Bridge
• We will use Camel to connect two ActiveMQ instances to one another
• Messages will be consumed from a destination on the external instance,
and produced into another destination on the internal instance
40© 2018 Rogue Wave Software, Inc. All Rights Reserved. 40
Claim check pattern
• Here we will implement a basic claim check pattern
• Messages will be stored in a local Postgres database, the payload
contents will be altered in the route, and then the original payload will be
retrieved
41© 2018 Rogue Wave Software, Inc. All Rights Reserved. 41
Questions?
Feel free to reach out after, too!
justin.reock@roguewave.com

More Related Content

What's hot

Using Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivityUsing Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivity
Claus Ibsen
 

What's hot (20)

Apache Camel K - Copenhagen
Apache Camel K - CopenhagenApache Camel K - Copenhagen
Apache Camel K - Copenhagen
 
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integrationSouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
 
Camel riders in the cloud
Camel riders in the cloudCamel riders in the cloud
Camel riders in the cloud
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
Integrating systems in the age of Quarkus and Camel
Integrating systems in the age of Quarkus and CamelIntegrating systems in the age of Quarkus and Camel
Integrating systems in the age of Quarkus and Camel
 
Apache Camel K - Fredericia
Apache Camel K - FredericiaApache Camel K - Fredericia
Apache Camel K - Fredericia
 
Camel Day Italy 2021 - What's new in Camel 3
Camel Day Italy 2021 - What's new in Camel 3Camel Day Italy 2021 - What's new in Camel 3
Camel Day Italy 2021 - What's new in Camel 3
 
What's new with Apache Camel 3? | DevNation Tech Talk
What's new with Apache Camel 3? | DevNation Tech TalkWhat's new with Apache Camel 3? | DevNation Tech Talk
What's new with Apache Camel 3? | DevNation Tech Talk
 
Integrating microservices with apache camel on kubernetes
Integrating microservices with apache camel on kubernetesIntegrating microservices with apache camel on kubernetes
Integrating microservices with apache camel on kubernetes
 
Building flexible ETL pipelines with Apache Camel on Quarkus
Building flexible ETL pipelines with Apache Camel on QuarkusBuilding flexible ETL pipelines with Apache Camel on Quarkus
Building flexible ETL pipelines with Apache Camel on Quarkus
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache Camel
 
ApacheCon NA - Apache Camel K: a cloud-native integration platform
ApacheCon NA - Apache Camel K: a cloud-native integration platformApacheCon NA - Apache Camel K: a cloud-native integration platform
ApacheCon NA - Apache Camel K: a cloud-native integration platform
 
ApacheCon EU 2016 - Apache Camel the integration library
ApacheCon EU 2016 - Apache Camel the integration libraryApacheCon EU 2016 - Apache Camel the integration library
ApacheCon EU 2016 - Apache Camel the integration library
 
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
 
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
 
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and TearsCamel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
 
Enterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache CamelEnterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns 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
 
Using Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivityUsing Apache Camel connectors for external connectivity
Using Apache Camel connectors for external connectivity
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
 

Similar to The forgotten route: Making Apache Camel work for you

API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
Akana
 

Similar to The forgotten route: Making Apache Camel work for you (20)

Integrating Postgres with ActiveMQ and Camel
Integrating Postgres with ActiveMQ and CamelIntegrating Postgres with ActiveMQ and Camel
Integrating Postgres with ActiveMQ and Camel
 
Making Apache Camel work for you
Making Apache Camel work for you Making Apache Camel work for you
Making Apache Camel work for you
 
Portal / BI 2008 Presentation by Ted Tschopp
Portal / BI 2008 Presentation by Ted TschoppPortal / BI 2008 Presentation by Ted Tschopp
Portal / BI 2008 Presentation by Ted Tschopp
 
Functions and DevOps
Functions and DevOpsFunctions and DevOps
Functions and DevOps
 
ZendCon - Integration and Asynchronous Processing with ActiveMQ and Camel
ZendCon - Integration and Asynchronous Processing with ActiveMQ and CamelZendCon - Integration and Asynchronous Processing with ActiveMQ and Camel
ZendCon - Integration and Asynchronous Processing with ActiveMQ and Camel
 
West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6
 
02 basics
02 basics02 basics
02 basics
 
Cracow MuleSoft Meetup #1
Cracow MuleSoft Meetup #1Cracow MuleSoft Meetup #1
Cracow MuleSoft Meetup #1
 
MuleSoft Meetup Singapore - Reliable Messaging & RTF Operations
MuleSoft Meetup Singapore - Reliable Messaging & RTF OperationsMuleSoft Meetup Singapore - Reliable Messaging & RTF Operations
MuleSoft Meetup Singapore - Reliable Messaging & RTF Operations
 
Succeding with the Apache SOA stack
Succeding with the Apache SOA stackSucceding with the Apache SOA stack
Succeding with the Apache SOA stack
 
Operations and Monitoring with Spring
Operations and Monitoring with SpringOperations and Monitoring with Spring
Operations and Monitoring with Spring
 
Why real integration developers ride Camels
Why real integration developers ride CamelsWhy real integration developers ride Camels
Why real integration developers ride Camels
 
eSoftHead - groupware solution
eSoftHead - groupware solutioneSoftHead - groupware solution
eSoftHead - groupware solution
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
 
Modernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIsModernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIs
 
#dbhouseparty - Should I be building Microservices?
#dbhouseparty - Should I be building Microservices?#dbhouseparty - Should I be building Microservices?
#dbhouseparty - Should I be building Microservices?
 
Introduction To Apache Camel
Introduction To Apache CamelIntroduction To Apache Camel
Introduction To Apache Camel
 
MuleSoft Madrid Meetup #3 slides 2nd July 2020
MuleSoft Madrid Meetup #3 slides 2nd July 2020MuleSoft Madrid Meetup #3 slides 2nd July 2020
MuleSoft Madrid Meetup #3 slides 2nd July 2020
 
Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019
 

More from Rogue Wave Software

More from Rogue Wave Software (20)

The Global Influence of Open Banking, API Security, and an Open Data Perspective
The Global Influence of Open Banking, API Security, and an Open Data PerspectiveThe Global Influence of Open Banking, API Security, and an Open Data Perspective
The Global Influence of Open Banking, API Security, and an Open Data Perspective
 
No liftoff, touchdown, or heartbeat shall miss because of a software failure
No liftoff, touchdown, or heartbeat shall miss because of a software failureNo liftoff, touchdown, or heartbeat shall miss because of a software failure
No liftoff, touchdown, or heartbeat shall miss because of a software failure
 
Disrupt or be disrupted – Using secure APIs to drive digital transformation
Disrupt or be disrupted – Using secure APIs to drive digital transformationDisrupt or be disrupted – Using secure APIs to drive digital transformation
Disrupt or be disrupted – Using secure APIs to drive digital transformation
 
Leveraging open banking specifications for rigorous API security – What’s in...
Leveraging open banking specifications for rigorous API security –  What’s in...Leveraging open banking specifications for rigorous API security –  What’s in...
Leveraging open banking specifications for rigorous API security – What’s in...
 
Adding layers of security to an API in real-time
Adding layers of security to an API in real-timeAdding layers of security to an API in real-time
Adding layers of security to an API in real-time
 
Getting the most from your API management platform: A case study
Getting the most from your API management platform: A case studyGetting the most from your API management platform: A case study
Getting the most from your API management platform: A case study
 
Advanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsAdvanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applications
 
Are open source and embedded software development on a collision course?
Are open source and embedded software development on a  collision course?Are open source and embedded software development on a  collision course?
Are open source and embedded software development on a collision course?
 
Three big mistakes with APIs and microservices
Three big mistakes with APIs and microservices Three big mistakes with APIs and microservices
Three big mistakes with APIs and microservices
 
5 strategies for enterprise cloud infrastructure success
5 strategies for enterprise cloud infrastructure success5 strategies for enterprise cloud infrastructure success
5 strategies for enterprise cloud infrastructure success
 
PSD2 & Open Banking: How to go from standards to implementation and compliance
PSD2 & Open Banking: How to go from standards to implementation and compliancePSD2 & Open Banking: How to go from standards to implementation and compliance
PSD2 & Open Banking: How to go from standards to implementation and compliance
 
Java 10 and beyond: Keeping up with the language and planning for the future
Java 10 and beyond: Keeping up with the language and planning for the futureJava 10 and beyond: Keeping up with the language and planning for the future
Java 10 and beyond: Keeping up with the language and planning for the future
 
How to keep developers happy and lawyers calm (Presented at ESC Boston)
How to keep developers happy and lawyers calm (Presented at ESC Boston)How to keep developers happy and lawyers calm (Presented at ESC Boston)
How to keep developers happy and lawyers calm (Presented at ESC Boston)
 
Open source applied - Real world use cases (Presented at Open Source 101)
Open source applied - Real world use cases (Presented at Open Source 101)Open source applied - Real world use cases (Presented at Open Source 101)
Open source applied - Real world use cases (Presented at Open Source 101)
 
How to migrate SourcePro apps from Solaris to Linux
How to migrate SourcePro apps from Solaris to LinuxHow to migrate SourcePro apps from Solaris to Linux
How to migrate SourcePro apps from Solaris to Linux
 
Approaches to debugging mixed-language HPC apps
Approaches to debugging mixed-language HPC appsApproaches to debugging mixed-language HPC apps
Approaches to debugging mixed-language HPC apps
 
Enterprise Linux: Justify your migration from Red Hat to CentOS
Enterprise Linux: Justify your migration from Red Hat to CentOSEnterprise Linux: Justify your migration from Red Hat to CentOS
Enterprise Linux: Justify your migration from Red Hat to CentOS
 
Walk through an enterprise Linux migration
Walk through an enterprise Linux migrationWalk through an enterprise Linux migration
Walk through an enterprise Linux migration
 
How to keep developers happy and lawyers calm
How to keep developers happy and lawyers calmHow to keep developers happy and lawyers calm
How to keep developers happy and lawyers calm
 
Open source and embedded software development
Open source and embedded software developmentOpen source and embedded software development
Open source and embedded software development
 

Recently uploaded

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 

The forgotten route: Making Apache Camel work for you

  • 1. 1© 2018 Rogue Wave Software, Inc. All Rights Reserved. 1 Making Camel Work for You • Justin Reock • Sr. Director and Lead Architect • Rogue Wave OSS Support
  • 2. 2© 2018 Rogue Wave Software, Inc. All Rights Reserved. 2 Who’s speaking to me?
  • 3. 3© 2018 Rogue Wave Software, Inc. All Rights Reserved. 3 Justin Reock • Sr. Director and Lead Architect of our OSS Support Team • Way too much experience with ActiveMQ and Camel • Developed our formal instructor-led training • Numerous professional services and training engagements • Early adopter of JMS and Camel • Major FL/OSS evangelist!
  • 4. 4© 2018 Rogue Wave Software, Inc. All Rights Reserved. 4 What are we going to solve?
  • 5. 5© 2018 Rogue Wave Software, Inc. All Rights Reserved. 5 Quick exercise… • I’m going to show you three slides • They all have something in common…. • See if you can figure out what it is!
  • 6. 6© 2018 Rogue Wave Software, Inc. All Rights Reserved. 6 The Chupacabra…
  • 7. 7© 2018 Rogue Wave Software, Inc. All Rights Reserved. 7 A magical unicorn…
  • 8. 8© 2018 Rogue Wave Software, Inc. All Rights Reserved. 8 BillingFulfillment CRME-Commerce A homogeneous enterprise landscape…
  • 9. 9© 2018 Rogue Wave Software, Inc. All Rights Reserved. 9 Answer  None of these things exist in real life!
  • 10. 10© 2018 Rogue Wave Software, Inc. All Rights Reserved. 10 A Word on ESBs • An Enterprise Service Bus is an architectural design pattern that focuses on providing federation between systems using a common runtime • Ideally, a Service Bus will provide loosely coupled endpoints to which various, heterogeneous systems can communicate with one another via their native frameworks • So, for instance, a .NET SOAP-driven application should be able to send data along the bus, which could be received by, say, a Java-based JMS destination • The ESB will provide payload and protocol normalization to facilitate that communication • Loose coupling will ensure that services can remain unaware of federated services’ languages and frameworks
  • 11. 11© 2018 Rogue Wave Software, Inc. All Rights Reserved. 11 Examples of ESBs
  • 12. 12© 2018 Rogue Wave Software, Inc. All Rights Reserved. 12 Common Enterprise Architecture Problems • No Universal Rules and Routing – Many application frameworks and protocols exist, but they are fragmented – They may use different protocols, data formats, and remote communication methods • Need for scale – Business tend to grow their infrastructure and federate more systems – As they do, the need for better scalability presents itself • Heterogeneous clients – Server frameworks aside, the application layer also tends to be highly fragmented – You will no doubt have applications in different languages that have a need to communicate with one another
  • 13. 13© 2018 Rogue Wave Software, Inc. All Rights Reserved. 13 Common problems with ESBs • Custom Adapters – When not using something like SOAP, often there is a need to customize an ESB client to fit into a particular framework – This refutes an ESB’s notion of loose coupling and platform agnosticism • Non-standard implementations – Often an ESB provider will implement a protocol “their way” which can be problematic for more standard platforms • Disorganized Dependencies – With all of the various transports, frameworks, and protocols an ESB should be capable of delivering, our dependency libraries can get messy • Deployment Governance – And with so many developers contributing to an organization’s ESB logic, controlling all of that deployment creates its own set of challenges
  • 14. 14© 2018 Rogue Wave Software, Inc. All Rights Reserved. 14 But isn’t Camel an ESB? • No! Camel can form an essential part of an ESB, like it does in the Apache Servicemix product • But it is a standalone normalized messaging framework • Camel is an example of one part of a Message Oriented Middleware system • It provides a routing and choreographing framework for moving data around an enterprise • Message Oriented Middleware often consists of several different platforms orchestrating in concert
  • 15. 15© 2018 Rogue Wave Software, Inc. All Rights Reserved. 15 But isn’t Camel an ESB? • No! Camel can form an essential part of an ESB, like it does in the Apache Servicemix product • But it is a standalone normalized messaging framework • Camel is an example of one part of a Message Oriented Middleware system • It provides a routing and choreographing framework for moving data around an enterprise • Message Oriented Middleware often consists of several different platforms orchestrating in concert
  • 16. 16© 2018 Rogue Wave Software, Inc. All Rights Reserved. 16 Message oriented middleware • Technically, MOM is any platform that sends and receives messages between distributed applications • This allows for asynchronous processing, and normalization of data exchanges • Clients connect to a messaging provider, and send and receive messages via that provider
  • 17. 17© 2018 Rogue Wave Software, Inc. All Rights Reserved. 17 What’s it good for? • Data normalization makes it a lot easier for disparate applications to trade information • Just like in web services, heterogeneous systems can agree on a data “contract” and send and receive data in that format • All the application needs is a client compatible with the messaging provider • And since messages are allowed to queue up on the message provider, it also makes it very easy to perform asynchronous processing • Most message providers offer additional benefits, like guaranteed delivery, options for traffic shaping, high availability, and scaling
  • 18. 18© 2018 Rogue Wave Software, Inc. All Rights Reserved. 18 What is Camel?
  • 19. 19© 2018 Rogue Wave Software, Inc. All Rights Reserved. 19 The repetitive world of integration • So, data routing and transformation in the Enterprise lends itself to a lot of what you would call “boilerplate” code • Boilerplate text, in publishing, is text that can be used and reused in many places • Boilerplate code is the same concept • How many times have you written code to open up a web server, push a file to an ftp site or drop a message into a message broker? • Have you ever felt that you’re just writing different versions of the same thing over and over again? • You’re not alone • Enter the concept of an Enterprise Integration Pattern…
  • 20. 20© 2018 Rogue Wave Software, Inc. All Rights Reserved. 20 What’s Camel? • Camel is an open source MOM language developed by Apache and based on Enterprise Integration Patterns • Book by Gregor Hohpe and Bobby Woolf • Centers around 60+ common patterns found in Enterprise integration projects • Defines these common patterns in a vendor neutral way • Camel aims to provide a language which implements these patterns, in a style modeled after the UNIX pipeline
  • 21. 21© 2018 Rogue Wave Software, Inc. All Rights Reserved. 21 Project notes • Camel is maintained by the Apache Camel community • It is a top-level project hosted at http://camel.apache.org • The project’s chief maintainer is Claus Ibsen, author of Camel in Action • As of August of 2017, the project has had almost 400 distinct committers, spanning over 30,000 commits • It is written primarily in Java, and also contains some Scala code • The project is licensed under the ALv2 (Apache License v2.0), which is considered a permissive license • So, Camel has been folded in to many other projects, including the Mule ESB and the Switchyard project • Camel can be run standalone, packaged into a WAR, or deployed as an OSGI bundle • A POJO syntax as well as a Spring DSL XML syntax are made available for developers
  • 22. 22© 2018 Rogue Wave Software, Inc. All Rights Reserved. 22 Integration patterns • Content Based Router – Where a message is routed to disparate endpoints based on message criteria
  • 23. 23© 2018 Rogue Wave Software, Inc. All Rights Reserved. 23 Integration patterns • Content Enricher – In which a basic message enters the pattern, takes data from another source, and then adds it to the message
  • 24. 24© 2018 Rogue Wave Software, Inc. All Rights Reserved. 24 Integration patterns • Recipient List – A message is broadcast to n channels based on message criteria. When this message is broadcast to all channels regardless, it becomes a Multicast pattern
  • 25. 25© 2018 Rogue Wave Software, Inc. All Rights Reserved. 25 Integration patterns • Scatter-Gather – In which messages are broadcast out to disparate endpoints and results are aggregated into a single message
  • 26. 26© 2018 Rogue Wave Software, Inc. All Rights Reserved. 26 How does it work? • Camel uses a repeatable, normalized concatenation of “Processor” and ”Message” objects in a group called an Exchange • There is an ”In” message, a “Processor”, and an “Out” message Processor In Out
  • 27. 27© 2018 Rogue Wave Software, Inc. All Rights Reserved. 27 How does it work? • And, you can chain these Exchanges together – just like piping commands through UNIX – and form a Camel Route • The “Out” message of a previous Exchange becomes the “In” message of a new Exchange: P In Out P In Out P In Out
  • 28. 28© 2018 Rogue Wave Software, Inc. All Rights Reserved. 28 Camel magic • Now here’s the magical part – a Processor can be anything you want • Components in Camel work by creating Processors that perform various business functions • The components can be chained together to build Integration Patterns • For instance, you can have an “FTP” processor that takes the In message and initiates an FTP session • Or you can have an “SMTP” processor that takes the In message and sends an email with it • This is in addition to Camel’s many built-in patterns, such as LoadBalance, Multicast, DataSets, etc. • And there are a lot of components: http://camel.apache.org/components.html
  • 29. 29© 2018 Rogue Wave Software, Inc. All Rights Reserved. 29 Camel components Uhm, yeah, the list isn’t gonna fit… The point is there are a lot!
  • 30. 30© 2018 Rogue Wave Software, Inc. All Rights Reserved. 30 Embedded scripting languages • Camel also contains a number of embedded script languages that can be used for various purposes • Simple: The Simple query language can be used to introspect message headers, payloads, and properties, and is useful when routing messages based on their content • Xpath: The XPath query language will let you traverse XML structures and query for attribute and entity values, which is great for routing messages based on their XML content • JSONPath: Just like XPath, except for JSON-structured messages • Groovy: The Groovy scripting language can be used for more advanced data introspection and manipulation • JavaScript: Yes, you can do entire processors in JavaScript
  • 31. 31© 2018 Rogue Wave Software, Inc. All Rights Reserved. 31 Camel source • Camel routes can be coded in Java POJO • Or by using Camel Spring DSL XML files from("activemq:foo").filter(). xquery("//foo"). to("activemq:bar") <route xmlns="http://camel.apache.org/schema/spring" id="TimerClient"> <from uri=”activemq:topic:broadcastData"/> <setBody> <constant>This is a test JMS message.</constant> </setBody> <to uri="activemq:Test_ActiveMQ_Route.inQueue"/> </route>
  • 32. 32© 2018 Rogue Wave Software, Inc. All Rights Reserved. 32 Camel deployment • Camel can be deployed in a number of ways: • It can be deployed as a Java Web App using Spring or POJO • Standalone Camel routes can also be deployed using Maven and Camel • Spring Boot can launch Camel routes • Camel can be embedded within another Java application • Or within a Java-based container such as Jetty, Tomcat, JBoss/Wildfly, and others • ActiveMQ contains the Camel core libraries and can launch and deploy Camel routes • And OSGI containers like Karaf or its Servicemix counterpart can launch Camel routes • Standalone Camel routes scale very nicely in microservice containers as well
  • 33. 33© 2018 Rogue Wave Software, Inc. All Rights Reserved. 33 Camel development • Major IDEs like Eclipse and IntelliJ can ease Camel development by allowing routes to execute within the IDE • As of Camel 2.16, comprehensive in-line tools are available which allow auto-completion and even list every parameter of an available component
  • 34. 34© 2018 Rogue Wave Software, Inc. All Rights Reserved. 34 Camel development • But HawtIO is my current favorite way to prototype with Camel • HawtIO allows for visual debugging of routes, tracing of message lifecycle, diagram driven development, as well as monitoring
  • 35. 35© 2018 Rogue Wave Software, Inc. All Rights Reserved. 35 Camel monitoring • Camel has a robust set of JMX instrumentation beans which can be looked at to gain more information on the route • Any JMX-capable enterprise monitoring solution will be a good fit for Camel
  • 36. 36© 2018 Rogue Wave Software, Inc. All Rights Reserved. 36 So Camel is pretty awesome… • Camel provides many benefits for enterprise messaging applications • It comes with a free library of over a hundred integration components, as well as a powerful framework for creating your own components • Camel routes can be visually debugged, similar to jBPM or BPEL • Camel cuts down on boilerplate code enormously, by providing Spring-based integration components for popular applications and frameworks • Camel is FOSS under Apache 2.0 License • As Camel improves its underlying Spring libraries, you can take advantage of better functionality with very little if any development effort • Camel’s syntax is very easy to understand and provides a low learning curve for developers
  • 37. 37© 2018 Rogue Wave Software, Inc. All Rights Reserved. 37 Demo: Content based router • In this example, we will be using a very simple content based router • In fact, we’ll be using the Simple query language to introspect a JMS header in a message, and routing it to a destination based on the contents of that header • We will use Camel deployed directly into ActiveMQ, and we’ll write it from scratch against a clean ActiveMQ install
  • 38. 38© 2018 Rogue Wave Software, Inc. All Rights Reserved. 38 Demo: File content translator • Here we will read the contents of new files entering into a file directory, and convert these files into JMS messages
  • 39. 39© 2018 Rogue Wave Software, Inc. All Rights Reserved. 39 Demo: JMS to JMS Bridge • We will use Camel to connect two ActiveMQ instances to one another • Messages will be consumed from a destination on the external instance, and produced into another destination on the internal instance
  • 40. 40© 2018 Rogue Wave Software, Inc. All Rights Reserved. 40 Claim check pattern • Here we will implement a basic claim check pattern • Messages will be stored in a local Postgres database, the payload contents will be altered in the route, and then the original payload will be retrieved
  • 41. 41© 2018 Rogue Wave Software, Inc. All Rights Reserved. 41 Questions? Feel free to reach out after, too! justin.reock@roguewave.com