SlideShare a Scribd company logo
1 of 27
Download to read offline
MESSAGING WITH 
AMQP AND RABBITMQ
What is AMQP? 
AMQP (Advanced Message 
Queuing Protocol) is a 
networking protocol that enables 
conforming client applications to 
communicate with conforming 
messaging middleware brokers.
WHAT ARE 
BROKERS 
Messaging brokers receive 
messages from publishers 
(applications that publish them, 
also known as producers) and 
route them to consumers 
(applications that process them).
EXAMPLE OF 
BROKERS 
• RabbitMQ (by VMWARE)! 
• Microsoft's Windows Azure 
Service Bus! 
• Red Hat Enterprise MRG! 
• StormMQ
Lorem Ipsum Dolor 
RABBITMQ Open Source message 
broker / queueing system 
written in Erlang 
implementing AMQP
Who Uses AMQP 
• JPMorgan - 1 billion AMQP messages per day; used in 
dozens of mission critical systems worldwide! 
• VMware - Makes extensive use of RabbitMQ in its 
virtualization products and cloud service! 
• Google! 
• UIDAI, Government of India - the largest online 
identity project in the world aiming to provide each of 
India's 1.2 billion residents with a unique identity 
number! 
• AT&T, Smith Electric Vehicles, Mozilla, RED HAT cloud 
services
INDUSTRIES Telecommunications, Defense, 
Manufacturing, Internet and 
Cloud Computing
Installing 
RABBitMQ 
• MAC OSX - brew install 
rabbitmq ! 
• Windows - download the 
exe
Running It rabbitmq-server
Enabling the admin 
console 
• rabbitmq-plugins enable 
rabbitmq_management! 
! 
• http://http://localhost: 
15672/
How to talk to 
RABBITMQ An AMQP Client. Available in 
most languages.
Ruby clients • Bunny! 
• Ruby AMQP Gem
INSTALLING 
BUNNY 
• gem install bunny ! 
• add to gem file -> gem 
‘bunny’
Lorem Ipsum Dolor 
AMQP-MODEL 
• messages can be anything,! 
plain text, json, bytes, etc.! 
• Publisher and Consumer 
are typically decoupled in 
big apps
Exchanges and 
Exchange Types 
• Direct exchange - specific 
routing key! 
• Fanout exchange - braodcast! 
• Topic exchange - regex style 
routing key! 
• Headers exchange
DIRECT 
EXCHANGE
Lorem Ipsum Dolor 
DIRECT 
EXCHANGE 2
Lorem Ipsum Dolor 
FAN-OUT 
• leaderboard updates or other 
global events! 
• Sport news sites can use score 
updates to mobile clients in near 
real-time! 
• Group chats can distribute 
messages between participants
Lorem Ipsum Dolor 
TOPIC 
EXCHANGE 
• delimeter is dots! 
• * = 1! 
• # = anything
USING BUNNY 
require “bunny”! 
#connect to rabbitmq! 
conn = Bunny.new! 
conn.start! 
#create channel! 
channel = conn.create_channel! 
#create / subscribe to a queue! 
queue = ch.queue(“hello”)! 
exchange = ch.default_exchange! 
#bind queue to an exchange! 
queue.bind(exchange, :routing_key => 
severity) 
exchange.publish("Hello 
World!", :routing_key => queue.name) 
queue.subscribe(:block => true) do | 
delivery_info, properties, body|! 
puts " [x] Received #{body}"! 
! 
# cancel the consumer to exit! 
delivery_info.consumer.cancel! 
end
DEMO 
code: https://github.com/selasiehanson/rabbitmq_presentaion_code.git
FANOUT 
❖ cd pubsub! 
❖ ruby receive_logs.rb > logs_from_rabbit.log! 
❖ ruby receive_logs.rb! 
❖ ruby emit_log.rb! 
❖ ruby emit_log.rb "Hello my peeps"
DIRECT (3 receivers) 
❖ cd ../routing/! 
❖ ruby receive_logs_direct.rb warning error > 
logs_from_rabbit.log! 
❖ ruby receive_logs_direct.rb info warning error! 
❖ ruby receive_logs_direct.rb info warning! 
❖ ruby emit_log_direct.rb error “Message 1”! 
❖ ruby emit_log_direct.rb warning “Message 2”
TOPIC 
❖ cd ../topic/! 
❖ ruby receive_logs_topic.rb "#"! 
❖ ruby receive_logs_topic.rb "kern.*"! 
❖ ruby receive_logs_topic.rb "*.critical"! 
❖ ruby receive_logs_topic.rb "kern.*" "*.critical"! 
❖ ruby emit_log_topic.rb "kern.critical" "A critical kernel 
error"
THE END
RESOURCES 
❖ http://www.amqp.org/! 
❖ http://www.rabbitmq.com/! 
❖ http://www.rabbitmq.com/getstarted.html! 
❖ http://www.rabbitmq.com/tutorials/amqp-concepts.html! 
❖ http://rubybunny.info/! 
❖ http://rubybunny.info/articles/getting_started.html! 
❖ read the bunny docs! 
❖ http://www.rubyinside.com/rabbitmq-a-fast-reliable-queuing-option-for- 
rubyists-1681.html

More Related Content

What's hot

[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging QueuesNaukri.com
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introductionShirish Bari
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQPOSSCON
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message BrokerMartin Toshev
 
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
 
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffArchitecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffJAX London
 
Messaging in the Cloud - AMQP, RabbitMQ and Spring
Messaging in the Cloud - AMQP, RabbitMQ and SpringMessaging in the Cloud - AMQP, RabbitMQ and Spring
Messaging in the Cloud - AMQP, RabbitMQ and SpringEberhard Wolff
 
Rabbitmq, amqp Intro - Messaging Patterns
Rabbitmq, amqp Intro - Messaging PatternsRabbitmq, amqp Intro - Messaging Patterns
Rabbitmq, amqp Intro - Messaging PatternsJavier Arias Losada
 
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
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQJames Carr
 
Rabbitmq an amqp message broker
Rabbitmq an amqp message brokerRabbitmq an amqp message broker
Rabbitmq an amqp message brokerANASYS
 
XMPP & AMQP
XMPP & AMQPXMPP & AMQP
XMPP & AMQPvoluntas
 

What's hot (20)

[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introduction
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
 
RabbitMq
RabbitMqRabbitMq
RabbitMq
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message Broker
 
AMQP with RabbitMQ
AMQP with RabbitMQAMQP with RabbitMQ
AMQP with RabbitMQ
 
AMQP for phpMelb
AMQP for phpMelbAMQP for phpMelb
AMQP for phpMelb
 
Message Broker System and RabbitMQ
Message Broker System and RabbitMQMessage Broker System and RabbitMQ
Message Broker System and RabbitMQ
 
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
 
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffArchitecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
 
Messaging in the Cloud - AMQP, RabbitMQ and Spring
Messaging in the Cloud - AMQP, RabbitMQ and SpringMessaging in the Cloud - AMQP, RabbitMQ and Spring
Messaging in the Cloud - AMQP, RabbitMQ and Spring
 
Rabbitmq, amqp Intro - Messaging Patterns
Rabbitmq, amqp Intro - Messaging PatternsRabbitmq, amqp Intro - Messaging Patterns
Rabbitmq, amqp Intro - Messaging Patterns
 
What is RabbitMQ ?
What is RabbitMQ ?What is RabbitMQ ?
What is RabbitMQ ?
 
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
 
Rabbitmq basics
Rabbitmq basicsRabbitmq basics
Rabbitmq basics
 
RabbitMQ fairly-indepth
RabbitMQ fairly-indepthRabbitMQ fairly-indepth
RabbitMQ fairly-indepth
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
 
Rabbitmq an amqp message broker
Rabbitmq an amqp message brokerRabbitmq an amqp message broker
Rabbitmq an amqp message broker
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
XMPP & AMQP
XMPP & AMQPXMPP & AMQP
XMPP & AMQP
 

Similar to Messaging with amqp and rabbitmq

Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...Ontico
 
Scaling applications with RabbitMQ at SunshinePHP
Scaling applications with RabbitMQ   at SunshinePHPScaling applications with RabbitMQ   at SunshinePHP
Scaling applications with RabbitMQ at SunshinePHPAlvaro Videla
 
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQAlvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQTanya Denisyuk
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfOrtus Solutions, Corp
 
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQMessage Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQMarian Marinov
 
IoT Service Bus - High availability with Internet of Things (IoT)/ API Rest/ ...
IoT Service Bus - High availability with Internet of Things (IoT)/ API Rest/ ...IoT Service Bus - High availability with Internet of Things (IoT)/ API Rest/ ...
IoT Service Bus - High availability with Internet of Things (IoT)/ API Rest/ ...Alexandre Brandão Lustosa
 
Second screen iot_day_stockholm_2014
Second screen iot_day_stockholm_2014Second screen iot_day_stockholm_2014
Second screen iot_day_stockholm_2014Steffen Larsen
 
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQ
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQFEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQ
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQAlexandre Brandão Lustosa
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqdevObjective
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqColdFusionConference
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionOrtus Solutions, Corp
 
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20Nathan O'Hanlon
 
Connecting applicationswitha mq
Connecting applicationswitha mqConnecting applicationswitha mq
Connecting applicationswitha mqRob Davies
 
RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009Paolo Negri
 
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...Paolo Negri
 
Multi-platform Enterprise Messaging with RabbitMQ
Multi-platform Enterprise Messaging with RabbitMQMulti-platform Enterprise Messaging with RabbitMQ
Multi-platform Enterprise Messaging with RabbitMQOrtus Solutions, Corp
 

Similar to Messaging with amqp and rabbitmq (20)

Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
 
Scaling applications with RabbitMQ at SunshinePHP
Scaling applications with RabbitMQ   at SunshinePHPScaling applications with RabbitMQ   at SunshinePHP
Scaling applications with RabbitMQ at SunshinePHP
 
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQAlvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
 
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQMessage Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
Message Queuing - Gearman, Mosquitto, Kafka and RabbitMQ
 
IoT Service Bus - High availability with Internet of Things (IoT)/ API Rest/ ...
IoT Service Bus - High availability with Internet of Things (IoT)/ API Rest/ ...IoT Service Bus - High availability with Internet of Things (IoT)/ API Rest/ ...
IoT Service Bus - High availability with Internet of Things (IoT)/ API Rest/ ...
 
Second screen iot_day_stockholm_2014
Second screen iot_day_stockholm_2014Second screen iot_day_stockholm_2014
Second screen iot_day_stockholm_2014
 
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQ
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQFEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQ
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQ
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusion
 
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
 
Connecting applicationswitha mq
Connecting applicationswitha mqConnecting applicationswitha mq
Connecting applicationswitha mq
 
Enterprise messaging
Enterprise messagingEnterprise messaging
Enterprise messaging
 
RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009
 
The bigrabbit
The bigrabbitThe bigrabbit
The bigrabbit
 
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
Distributed and concurrent programming with RabbitMQ and EventMachine Rails U...
 
Rabbit MQ
Rabbit MQRabbit MQ
Rabbit MQ
 
Follow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHPFollow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHP
 
Multi-platform Enterprise Messaging with RabbitMQ
Multi-platform Enterprise Messaging with RabbitMQMulti-platform Enterprise Messaging with RabbitMQ
Multi-platform Enterprise Messaging with RabbitMQ
 

Recently uploaded

"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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...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
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
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
 
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
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
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
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 

Recently uploaded (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 ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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...
 
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
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

Messaging with amqp and rabbitmq

  • 1. MESSAGING WITH AMQP AND RABBITMQ
  • 2. What is AMQP? AMQP (Advanced Message Queuing Protocol) is a networking protocol that enables conforming client applications to communicate with conforming messaging middleware brokers.
  • 3. WHAT ARE BROKERS Messaging brokers receive messages from publishers (applications that publish them, also known as producers) and route them to consumers (applications that process them).
  • 4. EXAMPLE OF BROKERS • RabbitMQ (by VMWARE)! • Microsoft's Windows Azure Service Bus! • Red Hat Enterprise MRG! • StormMQ
  • 5. Lorem Ipsum Dolor RABBITMQ Open Source message broker / queueing system written in Erlang implementing AMQP
  • 6. Who Uses AMQP • JPMorgan - 1 billion AMQP messages per day; used in dozens of mission critical systems worldwide! • VMware - Makes extensive use of RabbitMQ in its virtualization products and cloud service! • Google! • UIDAI, Government of India - the largest online identity project in the world aiming to provide each of India's 1.2 billion residents with a unique identity number! • AT&T, Smith Electric Vehicles, Mozilla, RED HAT cloud services
  • 7.
  • 8. INDUSTRIES Telecommunications, Defense, Manufacturing, Internet and Cloud Computing
  • 9. Installing RABBitMQ • MAC OSX - brew install rabbitmq ! • Windows - download the exe
  • 11. Enabling the admin console • rabbitmq-plugins enable rabbitmq_management! ! • http://http://localhost: 15672/
  • 12. How to talk to RABBITMQ An AMQP Client. Available in most languages.
  • 13. Ruby clients • Bunny! • Ruby AMQP Gem
  • 14. INSTALLING BUNNY • gem install bunny ! • add to gem file -> gem ‘bunny’
  • 15. Lorem Ipsum Dolor AMQP-MODEL • messages can be anything,! plain text, json, bytes, etc.! • Publisher and Consumer are typically decoupled in big apps
  • 16. Exchanges and Exchange Types • Direct exchange - specific routing key! • Fanout exchange - braodcast! • Topic exchange - regex style routing key! • Headers exchange
  • 18. Lorem Ipsum Dolor DIRECT EXCHANGE 2
  • 19. Lorem Ipsum Dolor FAN-OUT • leaderboard updates or other global events! • Sport news sites can use score updates to mobile clients in near real-time! • Group chats can distribute messages between participants
  • 20. Lorem Ipsum Dolor TOPIC EXCHANGE • delimeter is dots! • * = 1! • # = anything
  • 21. USING BUNNY require “bunny”! #connect to rabbitmq! conn = Bunny.new! conn.start! #create channel! channel = conn.create_channel! #create / subscribe to a queue! queue = ch.queue(“hello”)! exchange = ch.default_exchange! #bind queue to an exchange! queue.bind(exchange, :routing_key => severity) exchange.publish("Hello World!", :routing_key => queue.name) queue.subscribe(:block => true) do | delivery_info, properties, body|! puts " [x] Received #{body}"! ! # cancel the consumer to exit! delivery_info.consumer.cancel! end
  • 23. FANOUT ❖ cd pubsub! ❖ ruby receive_logs.rb > logs_from_rabbit.log! ❖ ruby receive_logs.rb! ❖ ruby emit_log.rb! ❖ ruby emit_log.rb "Hello my peeps"
  • 24. DIRECT (3 receivers) ❖ cd ../routing/! ❖ ruby receive_logs_direct.rb warning error > logs_from_rabbit.log! ❖ ruby receive_logs_direct.rb info warning error! ❖ ruby receive_logs_direct.rb info warning! ❖ ruby emit_log_direct.rb error “Message 1”! ❖ ruby emit_log_direct.rb warning “Message 2”
  • 25. TOPIC ❖ cd ../topic/! ❖ ruby receive_logs_topic.rb "#"! ❖ ruby receive_logs_topic.rb "kern.*"! ❖ ruby receive_logs_topic.rb "*.critical"! ❖ ruby receive_logs_topic.rb "kern.*" "*.critical"! ❖ ruby emit_log_topic.rb "kern.critical" "A critical kernel error"
  • 27. RESOURCES ❖ http://www.amqp.org/! ❖ http://www.rabbitmq.com/! ❖ http://www.rabbitmq.com/getstarted.html! ❖ http://www.rabbitmq.com/tutorials/amqp-concepts.html! ❖ http://rubybunny.info/! ❖ http://rubybunny.info/articles/getting_started.html! ❖ read the bunny docs! ❖ http://www.rubyinside.com/rabbitmq-a-fast-reliable-queuing-option-for- rubyists-1681.html