SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Presented By: Shiv Suraj Oberoi
Introduction to
Apache Camel with
Spring Boot
Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
Punctuality
Respect Knolx session
timings, you are requested
not to join sessions after a
5 minutes threshold post
the session start time.
Feedback
Make sure to submit a
constructive feedback for
all sessions as it is very
helpful for the presenter.
Silent Mode
Keep your mobile devices
in silent mode, feel free to
move out of session in
case you need to attend
an urgent call.
Avoid Disturbance
Avoid unwanted chit chat
during the session.
Agenda
01
02
03
04
05
Apache Camel Architecture
Overview of Apache Camel and the problem it
solves?
Building Routes With Apache Camel & Demo
What is Apache Camel & Reasons to Use
Apache Camel
Apache Camel Integration with Spring Boot
What is Apache Camel ?
● Apache Camel is an “Integration Framework”.
● Apache Camel allows us to define custom routing rules, and it also
allows us to decide from which source we want to accept messages.
● It also helps us to determine how to process those messages and
then send those messages to various destinations
● Camel provides high-level abstractions that allow us to connect with
a variety of systems using the same API, independent of protocol or
data format. This eliminates the need for unnecessary conversions
from one protocol to another.
Reasons to use Apache Camel
● Routing and mediation engine
● Extensive component library
● Easy Configuration
● Enterprise integration patterns
● Domain-specific language
● Payload-agnostic router
When to use Apache Camel
● Apache Camel with a rich set of components will be useful in applications
requiring integration with systems over different protocols (like files, APIs, or
JMS Queues).
● Apache Camel’s implementation of Enterprise Integration Patterns is useful to
fulfill complex integration requirements with tried and tested solutions for
recurring integration scenarios.
● Apache Camel is a Java framework, so it is especially good at working with
Java objects.
When not to use Apache Camel
● If we have simple integration involving calling few APIs
● Camel is not known to perform well for heavy data processing
Apache Camel Architecture
● Routing Engine
● Processor
● Components
● Camel Context
Apache Camel Architecture
Apache Camel Architecture -
Camel Context
CamelContext - Code Snippet
Overview of the problem that
Apache Camel solves
● Lets analyse Microservice 4. This particular service is interacting with almost 6
microservices and it might be using different transports for each service it is
interacting with.
● We can assume that Microservice 4 might be calling microservice 5 as a rest api,
how ever to communicate with Microservice 6 it might be using a queue.
● Now interacting with services as rest API’s or by using any other methods involves
wide variety of protocols.
● Now the question arise, how can we simplify these enterprise integrations or
how can we simplify the code that will be written which enables
microservice4 to talk to other microservices.
● All this can be taken care by implementing Enterprise Integration Patterns.
● Although understanding and implementing Enterprise Integration Patterns can
turnout to be a big challenge.
● And, This is where Apache Camel steps in. Apache Camel is one of the best
frameworks in this specific space.
● Apache Camel is an open source Enterprise Integration Framework, which allows
us to easily integrate systems who are either consuming or producing data.
● Apache Camel is extremely lightweight and extensible
○ It provides 100+ components for databases, message queues, API’s etc
○ Supports 200+ protocols, data formats
○ Provides a Domain Specific Language (DSL) customized to suit needs of
application integration
Integration of Apache Camel with
Spring Boot
● Spring boot supports auto-configuration with Apache Camel using a starter dependency
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-boot-starter</artifactId>
<version>3.17.0</version>
</dependency>
Building Routes with Apache Camel
I
Building Routes with Apache Camel
In Apache Camel, routing done in EMS(enterprise messaging systems) is the process of
taking a message from the input queue to different output queues based on the defined
conditions. The conditions set between the input and output queues are unknown to them.
The message consumer and producer are kept separate from the conditional logic.
Creating Camel Routes in spring boot
● We need to annotate our class which has the camel route definition with the
“@component” annotation.
● To create camel route. You have to extend RouteBuilder and add your route into
method configure().
Building Routes with Apache Camel
●
DEMO
Conclusion
Apache Camel is a lightweight integration tool that doesn’t require a separate
machine to use your integration system, and the language is relatively simple
to learn.
It enables developers to integrate several technologies and communicate
data with various endpoints such as files, queues, and external services
while being simple to use.
References
https://camel.apache.org/docs/
https://www.tutorialspoint.com/apache_camel/index.htm
https://www.javacodegeeks.com/2013/08/introduction-to-apache-camel.html
Apache Camel with Spring boot

Mais conteúdo relacionado

Semelhante a Apache Camel with Spring boot

The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
Mike Willbanks
 

Semelhante a Apache Camel with Spring boot (20)

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
 
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
 
Frequently asked MuleSoft Interview Questions and Answers from Techlightning
Frequently asked MuleSoft Interview Questions and Answers from TechlightningFrequently asked MuleSoft Interview Questions and Answers from Techlightning
Frequently asked MuleSoft Interview Questions and Answers from Techlightning
 
Apache servicemix1
Apache servicemix1Apache servicemix1
Apache servicemix1
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
 
Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)
 
Apache Camel Introduction
Apache Camel IntroductionApache Camel Introduction
Apache Camel Introduction
 
Low Code Integration with Apache Camel.pdf
Low Code Integration with Apache Camel.pdfLow Code Integration with Apache Camel.pdf
Low Code Integration with Apache Camel.pdf
 
Are you new to Apache Camel
Are you new to Apache CamelAre you new to Apache Camel
Are you new to Apache Camel
 
The forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for youThe forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for you
 
Mule meetup 25thjan
Mule meetup 25thjanMule meetup 25thjan
Mule meetup 25thjan
 
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
 
Succeding with the Apache SOA stack
Succeding with the Apache SOA stackSucceding with the Apache SOA stack
Succeding with the Apache SOA stack
 
Provisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack ManagerProvisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack Manager
 
Running Apache Spark Jobs Using Kubernetes
Running Apache Spark Jobs Using KubernetesRunning Apache Spark Jobs Using Kubernetes
Running Apache Spark Jobs Using Kubernetes
 
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
 
Servicemix4.5.0
Servicemix4.5.0Servicemix4.5.0
Servicemix4.5.0
 
EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
 
AWS ML Model Deployment
AWS ML Model DeploymentAWS ML Model Deployment
AWS ML Model Deployment
 
Introduction to Apache Beam
Introduction to Apache BeamIntroduction to Apache Beam
Introduction to Apache Beam
 

Mais de Knoldus Inc.

Mais de Knoldus Inc. (20)

Clean Code in Test Automation Differentiating Between the Good and the Bad
Clean Code in Test Automation  Differentiating Between the Good and the BadClean Code in Test Automation  Differentiating Between the Good and the Bad
Clean Code in Test Automation Differentiating Between the Good and the Bad
 
Integrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test AutomationIntegrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test Automation
 
State Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptxState Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptx
 
Authentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptxAuthentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptx
 
OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)
 
Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 
Introduction to Redis and its features.pptx
Introduction to Redis and its features.pptxIntroduction to Redis and its features.pptx
Introduction to Redis and its features.pptx
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdf
 
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptx
 
Data Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingData Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable Testing
 
K8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesK8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose Kubernetes
 
Introduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxIntroduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptx
 
Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptx
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptx
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptx
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptx
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake Presentation
 

Último

Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Último (20)

State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 

Apache Camel with Spring boot

  • 1. Presented By: Shiv Suraj Oberoi Introduction to Apache Camel with Spring Boot
  • 2. Lack of etiquette and manners is a huge turn off. KnolX Etiquettes Punctuality Respect Knolx session timings, you are requested not to join sessions after a 5 minutes threshold post the session start time. Feedback Make sure to submit a constructive feedback for all sessions as it is very helpful for the presenter. Silent Mode Keep your mobile devices in silent mode, feel free to move out of session in case you need to attend an urgent call. Avoid Disturbance Avoid unwanted chit chat during the session.
  • 3. Agenda 01 02 03 04 05 Apache Camel Architecture Overview of Apache Camel and the problem it solves? Building Routes With Apache Camel & Demo What is Apache Camel & Reasons to Use Apache Camel Apache Camel Integration with Spring Boot
  • 4. What is Apache Camel ? ● Apache Camel is an “Integration Framework”. ● Apache Camel allows us to define custom routing rules, and it also allows us to decide from which source we want to accept messages. ● It also helps us to determine how to process those messages and then send those messages to various destinations ● Camel provides high-level abstractions that allow us to connect with a variety of systems using the same API, independent of protocol or data format. This eliminates the need for unnecessary conversions from one protocol to another.
  • 5. Reasons to use Apache Camel ● Routing and mediation engine ● Extensive component library ● Easy Configuration ● Enterprise integration patterns ● Domain-specific language ● Payload-agnostic router
  • 6. When to use Apache Camel ● Apache Camel with a rich set of components will be useful in applications requiring integration with systems over different protocols (like files, APIs, or JMS Queues). ● Apache Camel’s implementation of Enterprise Integration Patterns is useful to fulfill complex integration requirements with tried and tested solutions for recurring integration scenarios. ● Apache Camel is a Java framework, so it is especially good at working with Java objects.
  • 7. When not to use Apache Camel ● If we have simple integration involving calling few APIs ● Camel is not known to perform well for heavy data processing
  • 8. Apache Camel Architecture ● Routing Engine ● Processor ● Components ● Camel Context
  • 10. Apache Camel Architecture - Camel Context
  • 12. Overview of the problem that Apache Camel solves
  • 13. ● Lets analyse Microservice 4. This particular service is interacting with almost 6 microservices and it might be using different transports for each service it is interacting with. ● We can assume that Microservice 4 might be calling microservice 5 as a rest api, how ever to communicate with Microservice 6 it might be using a queue. ● Now interacting with services as rest API’s or by using any other methods involves wide variety of protocols. ● Now the question arise, how can we simplify these enterprise integrations or how can we simplify the code that will be written which enables microservice4 to talk to other microservices. ● All this can be taken care by implementing Enterprise Integration Patterns. ● Although understanding and implementing Enterprise Integration Patterns can turnout to be a big challenge. ● And, This is where Apache Camel steps in. Apache Camel is one of the best frameworks in this specific space. ● Apache Camel is an open source Enterprise Integration Framework, which allows us to easily integrate systems who are either consuming or producing data. ● Apache Camel is extremely lightweight and extensible ○ It provides 100+ components for databases, message queues, API’s etc ○ Supports 200+ protocols, data formats ○ Provides a Domain Specific Language (DSL) customized to suit needs of application integration
  • 14. Integration of Apache Camel with Spring Boot ● Spring boot supports auto-configuration with Apache Camel using a starter dependency <dependency> <groupId>org.apache.camel.springboot</groupId> <artifactId>camel-spring-boot-starter</artifactId> <version>3.17.0</version> </dependency>
  • 15. Building Routes with Apache Camel I
  • 16. Building Routes with Apache Camel In Apache Camel, routing done in EMS(enterprise messaging systems) is the process of taking a message from the input queue to different output queues based on the defined conditions. The conditions set between the input and output queues are unknown to them. The message consumer and producer are kept separate from the conditional logic. Creating Camel Routes in spring boot ● We need to annotate our class which has the camel route definition with the “@component” annotation. ● To create camel route. You have to extend RouteBuilder and add your route into method configure().
  • 17. Building Routes with Apache Camel ●
  • 18. DEMO
  • 19. Conclusion Apache Camel is a lightweight integration tool that doesn’t require a separate machine to use your integration system, and the language is relatively simple to learn. It enables developers to integrate several technologies and communicate data with various endpoints such as files, queues, and external services while being simple to use.