SlideShare a Scribd company logo
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!

More Related Content

PPTX
Message Broker System and RabbitMQ
PDF
Introduction to AMQP Messaging with RabbitMQ
PPTX
The RabbitMQ Message Broker
PDF
[@NaukriEngineering] Messaging Queues
ODP
Introduction To RabbitMQ
PDF
Messaging Standards and Systems - AMQP & RabbitMQ
KEY
Real time system_performance_mon
KEY
RabbitMQ And Nanite
Message Broker System and RabbitMQ
Introduction to AMQP Messaging with RabbitMQ
The RabbitMQ Message Broker
[@NaukriEngineering] Messaging Queues
Introduction To RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
Real time system_performance_mon
RabbitMQ And Nanite

What's hot (20)

PPT
Rabbit MQ introduction
PDF
Full Stack Bus with Javascript, RabbitMQ and Postal.js
PPTX
High powered messaging with RabbitMQ
PDF
Messaging with RabbitMQ and AMQP
PPTX
Java Messaging with AMQP and RabbitMQ
PPT
Amqp Basic
PDF
RabbitMQ & Hutch
PDF
Messaging Standards and Systems - AMQP & RabbitMQ
PDF
Messaging with amqp and rabbitmq
PDF
RabbitMQ in PHP
PDF
What’s New in RabbitMQ 3.8?
PDF
Distributed messaging with AMQP
PDF
The Future of Messaging: RabbitMQ and AMQP
PDF
An update from the RabbitMQ team - Michael Klishin
PPTX
Spring RabbitMQ
PDF
RabbitMQ fairly-indepth
PPTX
Rabbit MQ introduction
PDF
A Closer Look at RabbitMQ
PDF
Integrating PostgreSql with RabbitMQ
PDF
AMQP for phpMelb
Rabbit MQ introduction
Full Stack Bus with Javascript, RabbitMQ and Postal.js
High powered messaging with RabbitMQ
Messaging with RabbitMQ and AMQP
Java Messaging with AMQP and RabbitMQ
Amqp Basic
RabbitMQ & Hutch
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging with amqp and rabbitmq
RabbitMQ in PHP
What’s New in RabbitMQ 3.8?
Distributed messaging with AMQP
The Future of Messaging: RabbitMQ and AMQP
An update from the RabbitMQ team - Michael Klishin
Spring RabbitMQ
RabbitMQ fairly-indepth
Rabbit MQ introduction
A Closer Look at RabbitMQ
Integrating PostgreSql with RabbitMQ
AMQP for phpMelb
Ad

Similar to AMQP with RabbitMQ (20)

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

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Machine learning based COVID-19 study performance prediction
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)
Machine learning based COVID-19 study performance prediction
“AI and Expert System Decision Support & Business Intelligence Systems”
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
Chapter 3 Spatial Domain Image Processing.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Monthly Chronicles - July 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Digital-Transformation-Roadmap-for-Companies.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Empathic Computing: Creating Shared Understanding
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Review of recent advances in non-invasive hemoglobin estimation
Teaching material agriculture food technology

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!

Editor's Notes

  • #12: Sending messages directly to queues is not enough