SlideShare une entreprise Scribd logo
1  sur  63
Messaging
RabbitMQ
Marcus Crafter
Red Artisan & CLEAR Interactive (@crafterm)
Daniel Neighman
CLEAR Interactive (@hassox)
Background
http://www.flickr.com/photos/james_c_mattison/2267135704/

During Development
1st Release
Complexity
Request/Response Time
Background Activity
Monolithic Extraction
Memory & Garbage
   Collection
External Communication
Messaging
Background processing

  BJ, DJ, BackgroundRB, Airbrush, Workling/Starling, DB

Messaging

  Stomp, XMPP, ActiveMQ, Amazon SQS, MQ Series, M$
Goldman Sachs
AMQP
Advanced Messaging Queueing Protocol
AMQP Working Group
Barclays Bank                 IONA Technologies
Cisco Systems                 JPMorgan Chase Bank
Credit Suisse                 Microsoft Corporation
Deutsche Börse                Novell
Envoy Technologies            Red Hat Inc
Goldman Sachs                 Solace Inc
iMatix Corporation            Tervela Inc


                     ... and more
Reliable, Transaction,
Acknowledgement, Routed,
  Pub Sub, Independent
Protocol Specification
AMQP Implementations

Apache Qpid
Red Hat Enterprise MRG
ØMQ
Zyre
OpenAMQ
and many more, plus bindings to existing products
Rabbit MQ
http://www.rabbitmq.com
Open Source
Erlang OTP
Distributed
Shiny
Architecture
AMQP & Rabbit MQ
RabbitMQ
 Producer


                    Exchange




Consumer    Queue    Queue     Queue
Queues
Acts as a message buffer between producer &
consumer
Exchange
Determines how messages are routed to queues
Producer
Publishes messages to the exchange
Consumer
Receives message from the queue
Message
Naturally :)
AMQP & Ruby
Libraries, Gems, etc
tmm1-amqp
Event Machine Based & Asynchronous
carrot & bunny
   Synchronous
Direct Exchange
  Routing Based on “key” that matches exactly
Direct Exchange
  Routing Based on “key” that matches exactly



                                    Direct
Direct Exchange
  Routing Based on “key” that matches exactly



                                     Direct




                         Homer
                        Bindings:
                      “Beer”“Food”
                           ,
Direct Exchange
  Routing Based on “key” that matches exactly



                                     Direct




                         Homer                   Marge
                        Bindings:               Bindings:
                      “Beer”“Food”
                           ,                     “Food”
Direct Exchange
  Routing Based on “key” that matches exactly



                                     Direct
Key = “Beer”



                         Homer                   Marge
                        Bindings:               Bindings:
                      “Beer”“Food”
                           ,                     “Food”
Direct Exchange
  Routing Based on “key” that matches exactly



                                     Direct




                         Homer                   Marge
                        Bindings:               Bindings:
                      “Beer”“Food”
                           ,                     “Food”
Direct Exchange
  Routing Based on “key” that matches exactly



                                     Direct
Key = “Food”



                         Homer                   Marge
                        Bindings:               Bindings:
                      “Beer”“Food”
                           ,                     “Food”
Direct Exchange
  Routing Based on “key” that matches exactly



                                     Direct




                         Homer                   Marge
                        Bindings:              Bindings:
                      Key =,“Food”            Key = “Food”
                      “Beer”“Food”              “Food”
Direct Exchange
Demo - Rails
Fanout Exchange
  Copies to all bound queues
Fanout Exchange
  Copies to all bound queues


                      Fanout




           Silo         Silo   Silo
Fanout Exchange
     Copies to all bound queues


Launch All               Fanout
  Nukes




              Silo         Silo   Silo
Fanout Exchange
  Copies to all bound queues


                      Fanout




        Launch All   Launch All   Launch All
           Silo         Silo         Silo
          Nukes        Nukes        Nukes
Fanout Exchange
Demo - Desktop
Topic Exchange
  Route By Key, with Key Globbing
Topic Exchange
  Route By Key, with Key Globbing



                       Topic




   Homer              Marge          Consumers
 Bindings:           Bindings:        Bindings:
  “*.Beer”        “Consume.Food”    “Consume.#”
Topic Exchange
     Route By Key, with Key Globbing



   Toast                  Topic
“Consume.Food”




     Homer               Marge          Consumers
   Bindings:            Bindings:        Bindings:
    “*.Beer”         “Consume.Food”    “Consume.#”
Topic Exchange
  Route By Key, with Key Globbing



                       Topic




   Homer              Marge          Consumers
 Bindings:           Bindings:        Bindings:
  “*.Beer”        “Consume.Food”    “Consume.#”
Topic Exchange
   Route By Key, with Key Globbing



Some Brand
 “Consume.Beer”         Topic




    Homer              Marge          Consumers
  Bindings:           Bindings:        Bindings:
   “*.Beer”        “Consume.Food”    “Consume.#”
Topic Exchange
  Route By Key, with Key Globbing



                       Topic




   Homer              Marge          Consumers
 Bindings:           Bindings:        Bindings:
  “*.Beer”        “Consume.Food”    “Consume.#”
Header Exchange
  Route on Meta Data
Header Exchange
       Route on Meta Data


                            Header




     Homer                 Marge              Watch Dog
    Bindings:             Bindings:            Bindings:
 “type” = “Beer”       “type” = “Food”,    “rating” = “fatty”
“rating” = “fatty”   “rating” = “health”
Header Exchange
       Route on Meta Data


                            Header




     Homer                 Marge              Watch Dog
    Bindings:             Bindings:            Bindings:
 “type” = “Beer”       “type” = “Food”,    “rating” = “fatty”
“rating” = “fatty”   “rating” = “health”
Header Exchange
       Route on Meta Data


                            Header




     Homer                 Marge              Watch Dog
    Bindings:             Bindings:            Bindings:
 “type” = “Beer”       “type” = “Food”,    “rating” = “fatty”
“rating” = “fatty”   “rating” = “health”
Header Exchange
       Route on Meta Data


                            Header




     Homer                 Marge              Watch Dog
    Bindings:             Bindings:            Bindings:
 “type” = “Beer”       “type” = “Food”,    “rating” = “fatty”
“rating” = “fatty”   “rating” = “health”
More Information?

http://amqp.org
http://www.rabbitmq.com
Google Video RabbitMQ
http://github.com/tmm1/amqp
http://github.com/celldee/bunny
Any Questions?

Contenu connexe

En vedette

redis 适用场景与实现
redis 适用场景与实现redis 适用场景与实现
redis 适用场景与实现iammutex
 
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
 
Integrating RabbitMQ with PHP
Integrating RabbitMQ with PHPIntegrating RabbitMQ with PHP
Integrating RabbitMQ with PHPAlvaro Videla
 
Scaling applications with RabbitMQ at SunshinePHP
Scaling applications with RabbitMQ   at SunshinePHPScaling applications with RabbitMQ   at SunshinePHP
Scaling applications with RabbitMQ at SunshinePHPAlvaro Videla
 
RabbitMQ fairly-indepth
RabbitMQ fairly-indepthRabbitMQ fairly-indepth
RabbitMQ fairly-indepthWee Keat Chin
 
RabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfRabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfAlvaro Videla
 
深入了解Redis
深入了解Redis深入了解Redis
深入了解Redisiammutex
 
Business Track: Building a Private Cloud to Empower the Business at Goldman ...
Business Track: Building a Private Cloud  to Empower the Business at Goldman ...Business Track: Building a Private Cloud  to Empower the Business at Goldman ...
Business Track: Building a Private Cloud to Empower the Business at Goldman ...MongoDB
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQJames Carr
 
Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer confluent
 
Redis for the Everyday Developer
Redis for the Everyday DeveloperRedis for the Everyday Developer
Redis for the Everyday DeveloperRoss Tuck
 
Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...
Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...
Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...confluent
 
Introduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQIntroduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQDmitriy Samovskiy
 
Redis in Practice
Redis in PracticeRedis in Practice
Redis in PracticeNoah Davis
 
마이크로서비스 아키텍처로 개발하기
마이크로서비스 아키텍처로 개발하기마이크로서비스 아키텍처로 개발하기
마이크로서비스 아키텍처로 개발하기Jaewoo Ahn
 
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askEverything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askCarlos Abalde
 
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
 

En vedette (19)

redis 适用场景与实现
redis 适用场景与实现redis 适用场景与实现
redis 适用场景与实现
 
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
 
Integrating RabbitMQ with PHP
Integrating RabbitMQ with PHPIntegrating RabbitMQ with PHP
Integrating RabbitMQ with PHP
 
Scaling applications with RabbitMQ at SunshinePHP
Scaling applications with RabbitMQ   at SunshinePHPScaling applications with RabbitMQ   at SunshinePHP
Scaling applications with RabbitMQ at SunshinePHP
 
RabbitMQ fairly-indepth
RabbitMQ fairly-indepthRabbitMQ fairly-indepth
RabbitMQ fairly-indepth
 
RabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfRabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft Conf
 
RabbitMQ
RabbitMQRabbitMQ
RabbitMQ
 
深入了解Redis
深入了解Redis深入了解Redis
深入了解Redis
 
Business Track: Building a Private Cloud to Empower the Business at Goldman ...
Business Track: Building a Private Cloud  to Empower the Business at Goldman ...Business Track: Building a Private Cloud  to Empower the Business at Goldman ...
Business Track: Building a Private Cloud to Empower the Business at Goldman ...
 
RabbitMQ Operations
RabbitMQ OperationsRabbitMQ Operations
RabbitMQ Operations
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
 
Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer
 
Redis for the Everyday Developer
Redis for the Everyday DeveloperRedis for the Everyday Developer
Redis for the Everyday Developer
 
Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...
Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...
Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...
 
Introduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQIntroduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQ
 
Redis in Practice
Redis in PracticeRedis in Practice
Redis in Practice
 
마이크로서비스 아키텍처로 개발하기
마이크로서비스 아키텍처로 개발하기마이크로서비스 아키텍처로 개발하기
마이크로서비스 아키텍처로 개발하기
 
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askEverything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to ask
 
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
 

Dernier

Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Dernier (20)

Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

RabbitMQ Messaging