SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
AMQP with RabbitMQ
Using Spring and Camel
Kosmas Kyriakidis: LinkedIn
Spyros Papageorgiou: LinkedIn, GitHub
● Software Engineers at A.M.D Telecom S.A
● We develop:
○ A new communication platform to provide communication as a service
● We do:
○ Agile Development
○ Continuous Integration
○ Continuous Deployment
○ Unit Testing
Who we are
● Why Messaging,
● AMQP Overview
● RabbitMQ
● AMQP Basics
● AMQP with Spring/Camel
Overview
Messaging
● Messaging provides a mechanism for loosely-coupled integration of systems
● The central unit of processing is a message which typically contains a body and a
header
● Messaging solutions provide means for:
○ securing message transfer, authenticating and authorizing messaging endpoints
○ subscribing to the broker
○ routing messages between endpoints
● Use cases include:
○ Log aggregation between systems
○ Event propagation between systems
○ Offloading long-running tasks to worker nodes
General Messaging Architecture
Message
Broker
Producer
Producer
Consumer
Consumer
Why Messaging
● Decoupling
○ Data, no action i.e. receiver can react arbitrarily
○ Asynchronous i.e. decoupled by time
● Reliable
○ Message can be stored and forwarded
○ Redelivery until message processed
But:
● Requires different architecture
● Very different from calling remote methods or polling
● Asynchronous
AMQP
● Advanced Message Queuing Protocol
● Open standard protocol (Less vendor lock in)
● Standard wire protocol
○ i.e. just one client library – no matter which
implementation you are using
● Support in all major languages
● Efficient
○ Binary wire protocol
○ Multiple channels per connection
RabbitMQ
● RabbitMQ is an open source message broker software
that implements AMQP(0.8, 0.9, 0.9.1)
● Numerous other protocols supported(XMPP, SMTP, ..)
● Foundation for demanding systems e.g.
○ NASA’s cloud initiative Nebula
○ Handles more than 1million msg/s on Google Cloud Compute
● Clustering built in
● Virtual Hosts for security and organization
● Comes with a web management interface
● Currently in 3.6.2
RabbitMQ
AMQP Basics: Queues
● Store messages / FIFO Queue
● Queues might be:
○ Durable: Survive server restarts
○ Exclusive: For one connection / Autogenerated
○ Auto Deleted: Deleted if connectioncloses
● Queue usually created by consumer
● A message from a Queue goes only to one consumer
QUEUE
C
C
AMQP Basics: Exchanges
● Exchange: Route messages (stateless)
● The type of Exchange defines the routing algorithm used
● No queue: Message discarded
● More dynamic, flexible and cleaner than JMS
● Usually created by producer
● A producer sends a messages to an Exchange
Exchange
P
Exchange Types: Direct
● Point to Point communication
● Producer declares exchange
● Consumer declares the queue and binds it to the exchange
Direct
Exchanges with binding keys
● Binding provides selector for routing messages from exchanges to queues
● Each binding between an exchange and a queue has a binding key
● Each message can be published with a routing key
● Routing of messages is determined based on matching between the routing and
binding keys
Message
Routing Key
Headers
Message Body
Bindings
Direct
Exchange Types: Fanout
● Broadcast messages
● Routing key is ignored
● Many queues, many consumers
● Broadcast to all bound queues
Exchange Types: Topic
● Delivery based on routing key
● Intended for multicast routing
● Messages are published with an explicit routing key
● Consumers use wildcards when binding queues to exchanges
● Supports multiple queues and multiple subscribers
Topic
Exchange Types: Header
● Similar to Direct but uses headers rather than routing key
● Queues can be bound to an exchange with multiple headers
● Multiple headers may be matched with "any" or "all"
Header Name Header Value
age 23
name kosmas
x-match all
Integrating with RabbitMQ using Spring/Camel
Apache Camel focuses on making integration easier and more accessible to developers.
It does this by providing:
● concrete implementations of all the widely used Enterprise Integration Patterns
(EIPs)
● connectivity to a great variety of transports and APIs
Maven dependencies you will need
● spring-boot-starter
● camel-spring-boot
● camel-rabbitmq
Lets see some code
● RabbitMQ Java tutorials using the official driver
○ https://www.rabbitmq.com/getstarted.html
● Camel component for integrating with RabbitMQ
○ http://camel.apache.org/rabbitmq
● The code you saw today
○ https://github.com/kkyriakidis/rabbit-meetup-poc/
● Spring AMQP tutorial using RabbitTemplate
○ https://github.com/spring-projects/spring-amqp-samples/
Helpful Links
Thank you for your time!

Weitere ähnliche Inhalte

Was ist angesagt?

Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introductionSitg Yao
 
Full Stack Bus with Javascript, RabbitMQ and Postal.js
Full Stack Bus with Javascript, RabbitMQ and Postal.jsFull Stack Bus with Javascript, RabbitMQ and Postal.js
Full Stack Bus with Javascript, RabbitMQ and Postal.jsJavier Arias Losada
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQJames Carr
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPEberhard Wolff
 
Java Messaging with AMQP and RabbitMQ
Java Messaging with AMQP and RabbitMQ Java Messaging with AMQP and RabbitMQ
Java Messaging with AMQP and RabbitMQ Maxim Konovalov
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQPOSSCON
 
Messaging with amqp and rabbitmq
Messaging with amqp and rabbitmqMessaging with amqp and rabbitmq
Messaging with amqp and rabbitmqSelasie Hanson
 
What’s New in RabbitMQ 3.8?
  What’s New in RabbitMQ 3.8?  What’s New in RabbitMQ 3.8?
What’s New in RabbitMQ 3.8?VMware Tanzu
 
Distributed messaging with AMQP
Distributed messaging with AMQPDistributed messaging with AMQP
Distributed messaging with AMQPWee Keat Chin
 
The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP Eberhard Wolff
 
An update from the RabbitMQ team - Michael Klishin
An update from the RabbitMQ team - Michael KlishinAn update from the RabbitMQ team - Michael Klishin
An update from the RabbitMQ team - Michael KlishinRabbitMQ Summit
 
RabbitMQ fairly-indepth
RabbitMQ fairly-indepthRabbitMQ fairly-indepth
RabbitMQ fairly-indepthWee Keat Chin
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introductionShirish Bari
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQGavin Roy
 

Was ist angesagt? (20)

Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introduction
 
Full Stack Bus with Javascript, RabbitMQ and Postal.js
Full Stack Bus with Javascript, RabbitMQ and Postal.jsFull Stack Bus with Javascript, RabbitMQ and Postal.js
Full Stack Bus with Javascript, RabbitMQ and Postal.js
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
 
Java Messaging with AMQP and RabbitMQ
Java Messaging with AMQP and RabbitMQ Java Messaging with AMQP and RabbitMQ
Java Messaging with AMQP and RabbitMQ
 
Amqp Basic
Amqp BasicAmqp Basic
Amqp Basic
 
RabbitMQ & Hutch
RabbitMQ & HutchRabbitMQ & Hutch
RabbitMQ & Hutch
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
 
Messaging with amqp and rabbitmq
Messaging with amqp and rabbitmqMessaging with amqp and rabbitmq
Messaging with amqp and rabbitmq
 
RabbitMQ in PHP
RabbitMQ in PHPRabbitMQ in PHP
RabbitMQ in PHP
 
What’s New in RabbitMQ 3.8?
  What’s New in RabbitMQ 3.8?  What’s New in RabbitMQ 3.8?
What’s New in RabbitMQ 3.8?
 
Distributed messaging with AMQP
Distributed messaging with AMQPDistributed messaging with AMQP
Distributed messaging with AMQP
 
The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP
 
An update from the RabbitMQ team - Michael Klishin
An update from the RabbitMQ team - Michael KlishinAn update from the RabbitMQ team - Michael Klishin
An update from the RabbitMQ team - Michael Klishin
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
RabbitMQ fairly-indepth
RabbitMQ fairly-indepthRabbitMQ fairly-indepth
RabbitMQ fairly-indepth
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introduction
 
A Closer Look at RabbitMQ
A Closer Look at RabbitMQA Closer Look at RabbitMQ
A Closer Look at RabbitMQ
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQ
 
AMQP for phpMelb
AMQP for phpMelbAMQP for phpMelb
AMQP for phpMelb
 

Ähnlich wie AMQP with RabbitMQ

WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end developmentWebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end developmentViach Kakovskyi
 
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...WebCamp
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfOrtus Solutions, Corp
 
Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017Ulf Lilleengen
 
Apache Kafka - Free Friday
Apache Kafka - Free FridayApache Kafka - Free Friday
Apache Kafka - Free FridayOtávio Carvalho
 
Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Akshata Sawant
 
Introduction to ZeroMQ - eSpace TechTalk
Introduction to ZeroMQ - eSpace TechTalkIntroduction to ZeroMQ - eSpace TechTalk
Introduction to ZeroMQ - eSpace TechTalkMahmoud Said
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementationEosSoftware
 
Orchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQOrchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQVMware Tanzu
 
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ Jitendra Bafna
 
KubeCon + CloudNative Con NA 2021 | A New Generation of NATS
KubeCon + CloudNative Con NA 2021 | A New Generation of NATSKubeCon + CloudNative Con NA 2021 | A New Generation of NATS
KubeCon + CloudNative Con NA 2021 | A New Generation of NATSNATS
 
Introduction of Apache Camel
Introduction of Apache CamelIntroduction of Apache Camel
Introduction of Apache CamelKnoldus Inc.
 
SOA Pattern-Asynchronous Queuing
SOA Pattern-Asynchronous QueuingSOA Pattern-Asynchronous Queuing
SOA Pattern-Asynchronous QueuingWSO2
 
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...Codemotion
 
Patna_Meetup_MQ
Patna_Meetup_MQPatna_Meetup_MQ
Patna_Meetup_MQOm Prakash
 
Message Queues a basic overview
Message Queues a basic overviewMessage Queues a basic overview
Message Queues a basic overviewGeshan Manandhar
 
Automation + dev ops summit hail hydrate! from stream to lake
Automation + dev ops summit   hail hydrate! from stream to lakeAutomation + dev ops summit   hail hydrate! from stream to lake
Automation + dev ops summit hail hydrate! from stream to lakeTimothy Spann
 
Do More With Message Queue
Do More With Message QueueDo More With Message Queue
Do More With Message QueueHean Hong Leong
 

Ähnlich wie AMQP with RabbitMQ (20)

WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end developmentWebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
 
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
 
Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017
 
Mqtt
MqttMqtt
Mqtt
 
Apache Kafka - Free Friday
Apache Kafka - Free FridayApache Kafka - Free Friday
Apache Kafka - Free Friday
 
Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20
 
Introduction to ZeroMQ - eSpace TechTalk
Introduction to ZeroMQ - eSpace TechTalkIntroduction to ZeroMQ - eSpace TechTalk
Introduction to ZeroMQ - eSpace TechTalk
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementation
 
Orchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQOrchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQ
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
 
KubeCon + CloudNative Con NA 2021 | A New Generation of NATS
KubeCon + CloudNative Con NA 2021 | A New Generation of NATSKubeCon + CloudNative Con NA 2021 | A New Generation of NATS
KubeCon + CloudNative Con NA 2021 | A New Generation of NATS
 
Introduction of Apache Camel
Introduction of Apache CamelIntroduction of Apache Camel
Introduction of Apache Camel
 
SOA Pattern-Asynchronous Queuing
SOA Pattern-Asynchronous QueuingSOA Pattern-Asynchronous Queuing
SOA Pattern-Asynchronous Queuing
 
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...
 
Patna_Meetup_MQ
Patna_Meetup_MQPatna_Meetup_MQ
Patna_Meetup_MQ
 
Message Queues a basic overview
Message Queues a basic overviewMessage Queues a basic overview
Message Queues a basic overview
 
Automation + dev ops summit hail hydrate! from stream to lake
Automation + dev ops summit   hail hydrate! from stream to lakeAutomation + dev ops summit   hail hydrate! from stream to lake
Automation + dev ops summit hail hydrate! from stream to lake
 
Do More With Message Queue
Do More With Message QueueDo More With Message Queue
Do More With Message Queue
 

Kürzlich hochgeladen

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 

Kürzlich hochgeladen (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

AMQP with RabbitMQ

  • 1. AMQP with RabbitMQ Using Spring and Camel
  • 2. Kosmas Kyriakidis: LinkedIn Spyros Papageorgiou: LinkedIn, GitHub ● Software Engineers at A.M.D Telecom S.A ● We develop: ○ A new communication platform to provide communication as a service ● We do: ○ Agile Development ○ Continuous Integration ○ Continuous Deployment ○ Unit Testing Who we are
  • 3. ● Why Messaging, ● AMQP Overview ● RabbitMQ ● AMQP Basics ● AMQP with Spring/Camel Overview
  • 4. Messaging ● Messaging provides a mechanism for loosely-coupled integration of systems ● The central unit of processing is a message which typically contains a body and a header ● Messaging solutions provide means for: ○ securing message transfer, authenticating and authorizing messaging endpoints ○ subscribing to the broker ○ routing messages between endpoints ● Use cases include: ○ Log aggregation between systems ○ Event propagation between systems ○ Offloading long-running tasks to worker nodes
  • 6. Why Messaging ● Decoupling ○ Data, no action i.e. receiver can react arbitrarily ○ Asynchronous i.e. decoupled by time ● Reliable ○ Message can be stored and forwarded ○ Redelivery until message processed But: ● Requires different architecture ● Very different from calling remote methods or polling ● Asynchronous
  • 7. AMQP ● Advanced Message Queuing Protocol ● Open standard protocol (Less vendor lock in) ● Standard wire protocol ○ i.e. just one client library – no matter which implementation you are using ● Support in all major languages ● Efficient ○ Binary wire protocol ○ Multiple channels per connection
  • 8. RabbitMQ ● RabbitMQ is an open source message broker software that implements AMQP(0.8, 0.9, 0.9.1) ● Numerous other protocols supported(XMPP, SMTP, ..) ● Foundation for demanding systems e.g. ○ NASA’s cloud initiative Nebula ○ Handles more than 1million msg/s on Google Cloud Compute ● Clustering built in ● Virtual Hosts for security and organization ● Comes with a web management interface ● Currently in 3.6.2
  • 10. AMQP Basics: Queues ● Store messages / FIFO Queue ● Queues might be: ○ Durable: Survive server restarts ○ Exclusive: For one connection / Autogenerated ○ Auto Deleted: Deleted if connectioncloses ● Queue usually created by consumer ● A message from a Queue goes only to one consumer QUEUE C C
  • 11. AMQP Basics: Exchanges ● Exchange: Route messages (stateless) ● The type of Exchange defines the routing algorithm used ● No queue: Message discarded ● More dynamic, flexible and cleaner than JMS ● Usually created by producer ● A producer sends a messages to an Exchange Exchange P
  • 12. Exchange Types: Direct ● Point to Point communication ● Producer declares exchange ● Consumer declares the queue and binds it to the exchange Direct
  • 13. Exchanges with binding keys ● Binding provides selector for routing messages from exchanges to queues ● Each binding between an exchange and a queue has a binding key ● Each message can be published with a routing key ● Routing of messages is determined based on matching between the routing and binding keys Message Routing Key Headers Message Body Bindings Direct
  • 14. Exchange Types: Fanout ● Broadcast messages ● Routing key is ignored ● Many queues, many consumers ● Broadcast to all bound queues
  • 15. Exchange Types: Topic ● Delivery based on routing key ● Intended for multicast routing ● Messages are published with an explicit routing key ● Consumers use wildcards when binding queues to exchanges ● Supports multiple queues and multiple subscribers Topic
  • 16. Exchange Types: Header ● Similar to Direct but uses headers rather than routing key ● Queues can be bound to an exchange with multiple headers ● Multiple headers may be matched with "any" or "all" Header Name Header Value age 23 name kosmas x-match all
  • 17. Integrating with RabbitMQ using Spring/Camel Apache Camel focuses on making integration easier and more accessible to developers. It does this by providing: ● concrete implementations of all the widely used Enterprise Integration Patterns (EIPs) ● connectivity to a great variety of transports and APIs Maven dependencies you will need ● spring-boot-starter ● camel-spring-boot ● camel-rabbitmq
  • 19. ● RabbitMQ Java tutorials using the official driver ○ https://www.rabbitmq.com/getstarted.html ● Camel component for integrating with RabbitMQ ○ http://camel.apache.org/rabbitmq ● The code you saw today ○ https://github.com/kkyriakidis/rabbit-meetup-poc/ ● Spring AMQP tutorial using RabbitTemplate ○ https://github.com/spring-projects/spring-amqp-samples/ Helpful Links
  • 20. Thank you for your time!

Hinweis der Redaktion

  1. Sending messages directly to queues is not enough