SlideShare a Scribd company logo
1 of 48
Download to read offline
Messaging Standards and Systems
AMQP & RabbitMQ
Gavin M. Roy
VP of Architecture
AWeber Communications
Twitter: @Crad
POSSCON
April 14, 2015
About Me
VP of Architecture

AWeber Communications

Blame me for pika, rabbitpy,
pamqp, and a handful of
RabbitMQ plugins

Blog: https://gavinroy.com 

Github: https://github.com/gmr

Book: http://manning.com/roy
Advanced Message Queueing Protocol
❖ Open Standard
❖ Platform and Vendor Neutral
❖ Multiple Versions
AMQP Timeline
2003
2005
2006
2008
2011
Initial Specification
Working Group formed
AMQP 0-8
AMQP 0-9-1
OASIS
AMQP 1.0
AMQP Working Group
❖ JPMorgan Chase
❖ Cisco Systems
❖ IONA Technologies
❖ iMatrix
❖ RedHat
❖ TWIST
❖ Bank of America
❖ Barclays
❖ Credit Suisse
❖ Deutsche Börse Systems
❖ Goldman Sachs
❖ HCL Technologies
❖ Progress Software
❖ IIT Software
❖ INETCO Systems Ltd.
❖ Informatica Corporation
❖ Microsoft Corporation
❖ my-Channels
❖ Novell
❖ Solace Systems
❖ Tervala, Inc.
❖ VMWare
❖ WSO2
Competing AMQP Standards
≠
0-8
&
0-9-1
1.0
AMQP 0-9-1
❖ Currently has wider support than AMQP 1.0
❖ Multiple Broker Implementations: 

RabbitMQ, Apache Qpid, and SwiftMQ to name a few
❖ Specifies a Model and Protocol
Native AMQP 0-8/0-9-1 Clients
C
Clojure
Cobol
Common Lisp
Delphi
Erlang
Go
Groovy
Haskell
Java
JavaScript
.NET
OCaml
Perl
PHP
Python
Ruby
Scala
❖ Exchange

Receives and route messages
❖ Message Queue

Stores messages until they can be

consumed
❖ Binding

Defines the relationship between an Exchange and Queue and provides
routing criteria
Advanced Message Queueing Model
X
Exchange
Binding
Message Queue
Routing Keys
❖ Provided when publishing a message
❖ Compared against binding keys by exchanges
❖ Ideally provide context to the message:
❖ Connote the type of the message
❖ Categorize the content in the message
❖ Specify the type of consumer that should receive it
Advanced Message Queueing Protocol
❖ Compact, binary frame format wire protocol
❖ Bi-directional RPC
❖ Commands consist of Classes and Methods:
❖ Example Request:



Queue.Declare(name=“foo”)
❖ Response:



Queue.DeclareOk(messages=0, consumers=0)
Common AMQP Terms
❖ Broker

A server that implements AMQP
❖ Producer or Publisher

A client application that sends messages to a broker
❖ Consumer

A client application that reads messages from a queue
Publishers and Consumers
CP
Multiple Publishers
CP
P
P
Multiple Consumers
C
C
C
P
AMQP Messages
❖ Comprised of 3 or more frames:
❖ Method Frame

Basic.Publish, Basic.Deliver, etc
❖ Content Header with body size & message properties 

timestamp, message-id, app-id, etc
❖ n Body Frames with the opaque message payload
AMQP 0-9-1 Issues & Gotchas
❖ Ambiguous
❖ Authentication
❖ Asynchronous
❖ Connection Negotiation
❖ Exceptions
!
RabbitMQ
❖ Open Source (MPL)
❖ Written in Erlang/OTP
❖ Developed/Maintained by Pivotal
❖ Multi-Protocol

AMQP 0-9-1 & 1.0, MQTT, STOMP, XMPP,
HTTP, Web-STOMP & More
❖ Roots in AMQP 0-8/0-9-1
Who Uses It?
Agora Games
Chef
Google AdMob
Instagram
MeetMe
Mercado Libre
Mozilla
NASA
New York Times
National Science Foundation
Openstack
Rapportive
Reddit
Soundcloud
(and many more)
Why Use RabbitMQ?
❖ Create loosely-coupled applications
❖ Communicate across applications or platforms
❖ Tap into pre-existing message flows for new purposes
❖ Scale-out clustering for growth, throughput, and HA
❖ Federation for WAN latencies and network partitions
❖ Extensible plugin-in architecture
RabbitMQ Extensions to AMQP
Authentication Failure
Exchange to Exchange Bindings
Delivery Confirmations
Basic.Nack
Consumer cancellations
Consumer priorities
Dead Letter Exchanges
Alternate Exchanges
Connection blocking
Message CC & BCC Routing
Queue Length Limits
Per Queue Message TTL
Per Message TTL
Queue TTL
Message User ID Validation
Auto-delete exchanges
RabbitMQ Clustering
❖ LAN Only
❖ Adds highly-available queues
❖ Is cohesive, publish and consume
from any node
❖ Leverages native Erlang clustering
and communication
❖ Has multiple strategies for dealing
with network partitions
❖ Manually configured via
configuration or command line*
RabbitMQ Federation
❖ Provides loosely coupled inter-
node/cluster RabbitMQ
communication
❖ Connect multiple RabbitMQ
clusters across data centers or the
Internet
❖ Can be applied to both exchanges
and queues
Cluster A
X
Cluster B
X
Cluster C
X
RabbitMQ Plugins
amqp1_0

Adds AMQP 1.0 support to
RabbitMQ
auth-backend-amqp

AMQP RPC for Authentication
auth-backend-ldap

Authenticate via an external LDAP
server
autocluster-consul

Automatically create clusters using
Consul
msg_store_eleveldb_index

LevelDB storage for queue messages
presence-exchange

Publishes messages upon binding
changes
rabbitmq-top

Top like view of RabbitMQ
processes in the management UI
sharding

Scale out RabbitMQ with automatic
queue sharding
(and many more)
Message Routing
Built-In Exchange Types
❖ Direct

String matching on the routing key
❖ Fanout

No routing key, messages delivered to all bound queues
❖ Topic

Pattern matching in the routing key
❖ Headers

No routing key, value matching in the headers property
Topic Exchange Binding Keys
Routing Key: namespace.delimited.keys
#

Receive all messages
namespace.#

Receive all messages in namespace
namespace.delimited.*

Receive all namespace.delimited messages
namespace.*.keys

Receive all namespace messages ending with keys
Exchange to Exchange Binding
X
X
X
Queue
Queue
Queue
Queue
Queue
Queue
Messages published into a topic exchange are
routed to two other exchanges and a queue
Messages published into the consistent-hashing
exchange are distributed amongst three queues
Messages published into a direct
exchange routed to two queues
P
Alternate Exchanges
P X
Unroutable
Messages
X
Unroutable messages are
sent to an alternate exchange
Dead Letter Exchanges
P X
Reject Queue
Queue C
X
Consumer rejects the
message without requeue
Dead-Letter Exchange
routes the message
Exchange Plugins
Consistent Hashing

Distribute messages via hashed value
of routing key
Event

Publishes messages on AMQP events
such as queue creation
Random

Distribute messages across all bound
queues randomly
PostgreSQL LISTEN

Subscribes to and publishes
PostgreSQL notifications
Recent History

Sends the last n messages to any
newly bound queue
Reverse Topic

Allows for routing patterns at publish
time and not via binding
Riak Storage

Stores messages published through
the exchange into Riak
Script Exchange

Calls out to external scripts for
message routing
Performance Considerations
Publishing Performance Scale
Persisted
M
essages
Transactions
H
A
Q
ueues
Publisherconfirm
s
N
o
guarantees
N
otification
on
failureAlternate
exchanges
H
A
Q
ueues
w
/Transactions
Persisted Messages IO Model
Disk
Queue
Message Queue
Queue
Messages with delivery-mode 2 sent
into RabbitMQ are persisted to disk
Pointers to the message are placed
in the queue data structures
When the message is no longer in
a queue, it is removed from disk
HA Queues & Performance
Queue
Queue
Queue
P
RabbitMQ Cluster
A publisher sends to any
node in a RabbitMQ cluster
The RabbitMQ servers in the
cluster synchronize the state
of the message in the queue
The message that was published is put in
the queue and is stored on each server
Consumer Performance Scale
G
etting
M
essages
C
onsum
ing
and
using
Transactions
C
onsum
e
w
ith
Acknow
ledgem
ents
C
onsum
ing
w
ith
"N
o
Ack
M
ode"enabled
C
onsum
ing
w
ith
Acknow
ledgem
ents
and
Q
oS
>
1
Operational Concerns
Trending & Monitoring
❖ RabbitMQ Management Plugin provides internal stats
❖ Queue depths, connection counts, throughput, memory
usage, etc
❖ Monitor with common tools such as Nagios or Sensu to
services such as Boundary and NewRelic
❖ Stream based monitoring with Riemann for anomaly
detection
Thoughts on Configuration
❖ Use configuration management!
❖ Even for exchanges, queues, and bindings if possible
❖ Helpful for disaster recovery
❖ Use RabbitMQ’s Policies when possible
❖ Exchanges and queues are immutable
❖ Deleting and redeclaring for changes can be
disruptive
Sample Usage Patterns
Evolve Tightly-Coupled Applications
Application DB
Decoupling Database Writes
Application C DB
Listen for Database Notifications
X Queue
Multi-Purposed Messages
C
C
C
P
Queue
DB
Cloud
GraphiteQueue
Queue
X
RPC
C / PC / P
P / C
C / PResponse Queue
X
X
Worker
Queue
Front-end web app
receives a request
Internet
App publishes RPC request
One of the subscribed
worker consumers receives
the RPC request
After processing the request,
the worker publishes the replyApp receives the reply
from the response queue
App replies to client
Delayed Messages
WARNING: This pattern is a hack and can cause undesirable situations should the wait queue overwhelm the system!
P X
X
Wait Queue
Ready Queue C
The wait queue is declared with a
message TTL and a dead-letter exchangeMessages that will be delivered
later are routed to a wait queue
When a message times out due to
the TTL, it is published to the DLX
The internally re-published message is
routed to the queue with active consumers
HA RabbitMQ with Federation
Upstream Cluster A
Queue A
Queue B
Upstream Cluster B
Queue A
Queue B
Downstream Cluster A
Queue A
Queue B
Downstream Cluster B
Queue A
Queue B
HA Proxy 1
HA Proxy 2
P
P
P
C A
C B
Questions?

More Related Content

What's hot

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
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPEberhard Wolff
 
Real time system_performance_mon
Real time system_performance_monReal time system_performance_mon
Real time system_performance_monTomas Doran
 
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
 
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
 
RabbitMQ And Nanite
RabbitMQ And NaniteRabbitMQ And Nanite
RabbitMQ And Nanitemattmatt
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging QueuesNaukri.com
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQJames Carr
 
What we've learned from running thousands of production RabbitMQ clusters - L...
What we've learned from running thousands of production RabbitMQ clusters - L...What we've learned from running thousands of production RabbitMQ clusters - L...
What we've learned from running thousands of production RabbitMQ clusters - L...RabbitMQ Summit
 
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
 
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
 
Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQKnoldus Inc.
 
Easy enterprise application integration with RabbitMQ and AMQP
Easy enterprise application integration with RabbitMQ and AMQPEasy enterprise application integration with RabbitMQ and AMQP
Easy enterprise application integration with RabbitMQ and AMQPRabbit MQ
 

What's hot (20)

AMQP with RabbitMQ
AMQP with RabbitMQAMQP with RabbitMQ
AMQP with RabbitMQ
 
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
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
 
Real time system_performance_mon
Real time system_performance_monReal time system_performance_mon
Real time system_performance_mon
 
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
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introduction
 
Amqp Basic
Amqp BasicAmqp Basic
Amqp Basic
 
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
 
RabbitMQ And Nanite
RabbitMQ And NaniteRabbitMQ And Nanite
RabbitMQ And Nanite
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
 
AMQP for phpMelb
AMQP for phpMelbAMQP for phpMelb
AMQP for phpMelb
 
What is RabbitMQ ?
What is RabbitMQ ?What is RabbitMQ ?
What is RabbitMQ ?
 
High powered messaging with RabbitMQ
High powered messaging with RabbitMQHigh powered messaging with RabbitMQ
High powered messaging with RabbitMQ
 
What we've learned from running thousands of production RabbitMQ clusters - L...
What we've learned from running thousands of production RabbitMQ clusters - L...What we've learned from running thousands of production RabbitMQ clusters - L...
What we've learned from running thousands of production RabbitMQ clusters - L...
 
A Closer Look at RabbitMQ
A Closer Look at RabbitMQA Closer Look at RabbitMQ
A Closer Look at RabbitMQ
 
Java Messaging with AMQP and RabbitMQ
Java Messaging with AMQP and RabbitMQ Java Messaging with AMQP and RabbitMQ
Java Messaging with AMQP and RabbitMQ
 
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?
 
Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQ
 
RabbitMQ in PHP
RabbitMQ in PHPRabbitMQ in PHP
RabbitMQ in PHP
 
Easy enterprise application integration with RabbitMQ and AMQP
Easy enterprise application integration with RabbitMQ and AMQPEasy enterprise application integration with RabbitMQ and AMQP
Easy enterprise application integration with RabbitMQ and AMQP
 

Viewers also liked

Automating OpenStack Deployment with Fuel
Automating OpenStack Deployment with FuelAutomating OpenStack Deployment with Fuel
Automating OpenStack Deployment with FuelTomasz Zen Napierala
 
Commication Framework in OpenStack
Commication Framework in OpenStackCommication Framework in OpenStack
Commication Framework in OpenStackSean Chang
 
[2015-05월 세미나] 파이선 초심자의 Openstack
[2015-05월 세미나] 파이선 초심자의 Openstack[2015-05월 세미나] 파이선 초심자의 Openstack
[2015-05월 세미나] 파이선 초심자의 OpenstackOpenStack Korea Community
 
OpenStack DevStack Install - 2부 (Multi-nodes)
OpenStack DevStack Install - 2부 (Multi-nodes)OpenStack DevStack Install - 2부 (Multi-nodes)
OpenStack DevStack Install - 2부 (Multi-nodes)Ian Choi
 
Openstack Study Nova 1
Openstack Study Nova 1Openstack Study Nova 1
Openstack Study Nova 1Jinho Shin
 
오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기영우 김
 

Viewers also liked (6)

Automating OpenStack Deployment with Fuel
Automating OpenStack Deployment with FuelAutomating OpenStack Deployment with Fuel
Automating OpenStack Deployment with Fuel
 
Commication Framework in OpenStack
Commication Framework in OpenStackCommication Framework in OpenStack
Commication Framework in OpenStack
 
[2015-05월 세미나] 파이선 초심자의 Openstack
[2015-05월 세미나] 파이선 초심자의 Openstack[2015-05월 세미나] 파이선 초심자의 Openstack
[2015-05월 세미나] 파이선 초심자의 Openstack
 
OpenStack DevStack Install - 2부 (Multi-nodes)
OpenStack DevStack Install - 2부 (Multi-nodes)OpenStack DevStack Install - 2부 (Multi-nodes)
OpenStack DevStack Install - 2부 (Multi-nodes)
 
Openstack Study Nova 1
Openstack Study Nova 1Openstack Study Nova 1
Openstack Study Nova 1
 
오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기
 

Similar to Messaging Standards and Systems - AMQP & RabbitMQ

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
 
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
 
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsBeyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsClemens Vasters
 
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsJohn Staveley
 
Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?Anton Nazaruk
 
Module: Mutable Content in IPFS
Module: Mutable Content in IPFSModule: Mutable Content in IPFS
Module: Mutable Content in IPFSIoannis Psaras
 
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...StreamNative
 
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
 
Captial One: Why Stream Data as Part of Data Transformation?
Captial One: Why Stream Data as Part of Data Transformation?Captial One: Why Stream Data as Part of Data Transformation?
Captial One: Why Stream Data as Part of Data Transformation?ScyllaDB
 
ITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de Bruin
ITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de BruinITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de Bruin
ITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de BruinOrtus Solutions, Corp
 
Multi-language/multi-OS communication using RabbitMQ
Multi-language/multi-OS communication using RabbitMQMulti-language/multi-OS communication using RabbitMQ
Multi-language/multi-OS communication using RabbitMQWil de Bruin
 
Hail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open sourceHail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open sourceTimothy Spann
 
Message Broker implementation in Kubernetes
Message Broker implementation in KubernetesMessage Broker implementation in Kubernetes
Message Broker implementation in KubernetesSuman Chakraborty
 
Devfest uk & ireland using apache nifi with apache pulsar for fast data on-r...
Devfest uk & ireland  using apache nifi with apache pulsar for fast data on-r...Devfest uk & ireland  using apache nifi with apache pulsar for fast data on-r...
Devfest uk & ireland using apache nifi with apache pulsar for fast data on-r...Timothy Spann
 
HPC Controls Future
HPC Controls FutureHPC Controls Future
HPC Controls Futurercastain
 
Open Source Bristol 30 March 2022
Open Source Bristol 30 March 2022Open Source Bristol 30 March 2022
Open Source Bristol 30 March 2022Timothy Spann
 

Similar to Messaging Standards and Systems - AMQP & RabbitMQ (20)

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
 
Rabbit MQ
Rabbit MQRabbit MQ
Rabbit MQ
 
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
 
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsBeyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
 
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
 
Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?
 
Module: Mutable Content in IPFS
Module: Mutable Content in IPFSModule: Mutable Content in IPFS
Module: Mutable Content in IPFS
 
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...
 
Multi-platform Enterprise Messaging with RabbitMQ
Multi-platform Enterprise Messaging with RabbitMQMulti-platform Enterprise Messaging with RabbitMQ
Multi-platform Enterprise Messaging with RabbitMQ
 
Captial One: Why Stream Data as Part of Data Transformation?
Captial One: Why Stream Data as Part of Data Transformation?Captial One: Why Stream Data as Part of Data Transformation?
Captial One: Why Stream Data as Part of Data Transformation?
 
ITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de Bruin
ITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de BruinITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de Bruin
ITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de Bruin
 
Multi-language/multi-OS communication using RabbitMQ
Multi-language/multi-OS communication using RabbitMQMulti-language/multi-OS communication using RabbitMQ
Multi-language/multi-OS communication using RabbitMQ
 
Hail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open sourceHail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open source
 
Message Broker implementation in Kubernetes
Message Broker implementation in KubernetesMessage Broker implementation in Kubernetes
Message Broker implementation in Kubernetes
 
Devfest uk & ireland using apache nifi with apache pulsar for fast data on-r...
Devfest uk & ireland  using apache nifi with apache pulsar for fast data on-r...Devfest uk & ireland  using apache nifi with apache pulsar for fast data on-r...
Devfest uk & ireland using apache nifi with apache pulsar for fast data on-r...
 
HPC Controls Future
HPC Controls FutureHPC Controls Future
HPC Controls Future
 
Mule with rabbitmq
Mule with rabbitmqMule with rabbitmq
Mule with rabbitmq
 
Open Source Bristol 30 March 2022
Open Source Bristol 30 March 2022Open Source Bristol 30 March 2022
Open Source Bristol 30 March 2022
 
Message queues
Message queuesMessage queues
Message queues
 

More from POSSCON

Why Meteor.JS?
Why Meteor.JS?Why Meteor.JS?
Why Meteor.JS?POSSCON
 
Vagrant 101
Vagrant 101Vagrant 101
Vagrant 101POSSCON
 
Tools for Open Source Systems Administration
Tools for Open Source Systems AdministrationTools for Open Source Systems Administration
Tools for Open Source Systems AdministrationPOSSCON
 
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...POSSCON
 
Accelerating Application Delivery with OpenShift
Accelerating Application Delivery with OpenShiftAccelerating Application Delivery with OpenShift
Accelerating Application Delivery with OpenShiftPOSSCON
 
Openstack 101
Openstack 101Openstack 101
Openstack 101POSSCON
 
Community Building: The Open Source Way
Community Building: The Open Source WayCommunity Building: The Open Source Way
Community Building: The Open Source WayPOSSCON
 
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP AnywayI Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP AnywayPOSSCON
 
Software Defined Networking (SDN) for the Datacenter
Software Defined Networking (SDN) for the DatacenterSoftware Defined Networking (SDN) for the Datacenter
Software Defined Networking (SDN) for the DatacenterPOSSCON
 
Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...POSSCON
 
Why Your Open Source Story Matters
Why Your Open Source Story MattersWhy Your Open Source Story Matters
Why Your Open Source Story MattersPOSSCON
 
How YARN Enables Multiple Data Processing Engines in Hadoop
How YARN Enables Multiple Data Processing Engines in HadoopHow YARN Enables Multiple Data Processing Engines in Hadoop
How YARN Enables Multiple Data Processing Engines in HadoopPOSSCON
 
Google Summer of Code
Google Summer of CodeGoogle Summer of Code
Google Summer of CodePOSSCON
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to HadoopPOSSCON
 
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...How to Use Cryptography Properly: The Common Mistakes People Make When Using ...
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...POSSCON
 
Cyber Security and Open Source
Cyber Security and Open SourceCyber Security and Open Source
Cyber Security and Open SourcePOSSCON
 
Intro to AngularJS
Intro to AngularJSIntro to AngularJS
Intro to AngularJSPOSSCON
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An IntroductionPOSSCON
 
Graph the Planet!
Graph the Planet!Graph the Planet!
Graph the Planet!POSSCON
 
Software Freedom Licensing: What You Must Know
Software Freedom Licensing: What You Must KnowSoftware Freedom Licensing: What You Must Know
Software Freedom Licensing: What You Must KnowPOSSCON
 

More from POSSCON (20)

Why Meteor.JS?
Why Meteor.JS?Why Meteor.JS?
Why Meteor.JS?
 
Vagrant 101
Vagrant 101Vagrant 101
Vagrant 101
 
Tools for Open Source Systems Administration
Tools for Open Source Systems AdministrationTools for Open Source Systems Administration
Tools for Open Source Systems Administration
 
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
 
Accelerating Application Delivery with OpenShift
Accelerating Application Delivery with OpenShiftAccelerating Application Delivery with OpenShift
Accelerating Application Delivery with OpenShift
 
Openstack 101
Openstack 101Openstack 101
Openstack 101
 
Community Building: The Open Source Way
Community Building: The Open Source WayCommunity Building: The Open Source Way
Community Building: The Open Source Way
 
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP AnywayI Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
 
Software Defined Networking (SDN) for the Datacenter
Software Defined Networking (SDN) for the DatacenterSoftware Defined Networking (SDN) for the Datacenter
Software Defined Networking (SDN) for the Datacenter
 
Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...Application Security on a Dime: A Practical Guide to Using Functional Open So...
Application Security on a Dime: A Practical Guide to Using Functional Open So...
 
Why Your Open Source Story Matters
Why Your Open Source Story MattersWhy Your Open Source Story Matters
Why Your Open Source Story Matters
 
How YARN Enables Multiple Data Processing Engines in Hadoop
How YARN Enables Multiple Data Processing Engines in HadoopHow YARN Enables Multiple Data Processing Engines in Hadoop
How YARN Enables Multiple Data Processing Engines in Hadoop
 
Google Summer of Code
Google Summer of CodeGoogle Summer of Code
Google Summer of Code
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to Hadoop
 
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...How to Use Cryptography Properly: The Common Mistakes People Make When Using ...
How to Use Cryptography Properly: The Common Mistakes People Make When Using ...
 
Cyber Security and Open Source
Cyber Security and Open SourceCyber Security and Open Source
Cyber Security and Open Source
 
Intro to AngularJS
Intro to AngularJSIntro to AngularJS
Intro to AngularJS
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Graph the Planet!
Graph the Planet!Graph the Planet!
Graph the Planet!
 
Software Freedom Licensing: What You Must Know
Software Freedom Licensing: What You Must KnowSoftware Freedom Licensing: What You Must Know
Software Freedom Licensing: What You Must Know
 

Recently uploaded

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Messaging Standards and Systems - AMQP & RabbitMQ

  • 1. Messaging Standards and Systems AMQP & RabbitMQ Gavin M. Roy VP of Architecture AWeber Communications Twitter: @Crad POSSCON April 14, 2015
  • 2. About Me VP of Architecture
 AWeber Communications Blame me for pika, rabbitpy, pamqp, and a handful of RabbitMQ plugins Blog: https://gavinroy.com Github: https://github.com/gmr Book: http://manning.com/roy
  • 3. Advanced Message Queueing Protocol ❖ Open Standard ❖ Platform and Vendor Neutral ❖ Multiple Versions
  • 4. AMQP Timeline 2003 2005 2006 2008 2011 Initial Specification Working Group formed AMQP 0-8 AMQP 0-9-1 OASIS AMQP 1.0
  • 5. AMQP Working Group ❖ JPMorgan Chase ❖ Cisco Systems ❖ IONA Technologies ❖ iMatrix ❖ RedHat ❖ TWIST ❖ Bank of America ❖ Barclays ❖ Credit Suisse ❖ Deutsche Börse Systems ❖ Goldman Sachs ❖ HCL Technologies ❖ Progress Software ❖ IIT Software ❖ INETCO Systems Ltd. ❖ Informatica Corporation ❖ Microsoft Corporation ❖ my-Channels ❖ Novell ❖ Solace Systems ❖ Tervala, Inc. ❖ VMWare ❖ WSO2
  • 7. AMQP 0-9-1 ❖ Currently has wider support than AMQP 1.0 ❖ Multiple Broker Implementations: 
 RabbitMQ, Apache Qpid, and SwiftMQ to name a few ❖ Specifies a Model and Protocol
  • 8. Native AMQP 0-8/0-9-1 Clients C Clojure Cobol Common Lisp Delphi Erlang Go Groovy Haskell Java JavaScript .NET OCaml Perl PHP Python Ruby Scala
  • 9. ❖ Exchange
 Receives and route messages ❖ Message Queue
 Stores messages until they can be
 consumed ❖ Binding
 Defines the relationship between an Exchange and Queue and provides routing criteria Advanced Message Queueing Model X Exchange Binding Message Queue
  • 10. Routing Keys ❖ Provided when publishing a message ❖ Compared against binding keys by exchanges ❖ Ideally provide context to the message: ❖ Connote the type of the message ❖ Categorize the content in the message ❖ Specify the type of consumer that should receive it
  • 11. Advanced Message Queueing Protocol ❖ Compact, binary frame format wire protocol ❖ Bi-directional RPC ❖ Commands consist of Classes and Methods: ❖ Example Request:
 
 Queue.Declare(name=“foo”) ❖ Response:
 
 Queue.DeclareOk(messages=0, consumers=0)
  • 12. Common AMQP Terms ❖ Broker
 A server that implements AMQP ❖ Producer or Publisher
 A client application that sends messages to a broker ❖ Consumer
 A client application that reads messages from a queue
  • 16. AMQP Messages ❖ Comprised of 3 or more frames: ❖ Method Frame
 Basic.Publish, Basic.Deliver, etc ❖ Content Header with body size & message properties 
 timestamp, message-id, app-id, etc ❖ n Body Frames with the opaque message payload
  • 17. AMQP 0-9-1 Issues & Gotchas ❖ Ambiguous ❖ Authentication ❖ Asynchronous ❖ Connection Negotiation ❖ Exceptions !
  • 18. RabbitMQ ❖ Open Source (MPL) ❖ Written in Erlang/OTP ❖ Developed/Maintained by Pivotal ❖ Multi-Protocol
 AMQP 0-9-1 & 1.0, MQTT, STOMP, XMPP, HTTP, Web-STOMP & More ❖ Roots in AMQP 0-8/0-9-1
  • 19. Who Uses It? Agora Games Chef Google AdMob Instagram MeetMe Mercado Libre Mozilla NASA New York Times National Science Foundation Openstack Rapportive Reddit Soundcloud (and many more)
  • 20. Why Use RabbitMQ? ❖ Create loosely-coupled applications ❖ Communicate across applications or platforms ❖ Tap into pre-existing message flows for new purposes ❖ Scale-out clustering for growth, throughput, and HA ❖ Federation for WAN latencies and network partitions ❖ Extensible plugin-in architecture
  • 21. RabbitMQ Extensions to AMQP Authentication Failure Exchange to Exchange Bindings Delivery Confirmations Basic.Nack Consumer cancellations Consumer priorities Dead Letter Exchanges Alternate Exchanges Connection blocking Message CC & BCC Routing Queue Length Limits Per Queue Message TTL Per Message TTL Queue TTL Message User ID Validation Auto-delete exchanges
  • 22. RabbitMQ Clustering ❖ LAN Only ❖ Adds highly-available queues ❖ Is cohesive, publish and consume from any node ❖ Leverages native Erlang clustering and communication ❖ Has multiple strategies for dealing with network partitions ❖ Manually configured via configuration or command line*
  • 23. RabbitMQ Federation ❖ Provides loosely coupled inter- node/cluster RabbitMQ communication ❖ Connect multiple RabbitMQ clusters across data centers or the Internet ❖ Can be applied to both exchanges and queues Cluster A X Cluster B X Cluster C X
  • 24. RabbitMQ Plugins amqp1_0
 Adds AMQP 1.0 support to RabbitMQ auth-backend-amqp
 AMQP RPC for Authentication auth-backend-ldap
 Authenticate via an external LDAP server autocluster-consul
 Automatically create clusters using Consul msg_store_eleveldb_index
 LevelDB storage for queue messages presence-exchange
 Publishes messages upon binding changes rabbitmq-top
 Top like view of RabbitMQ processes in the management UI sharding
 Scale out RabbitMQ with automatic queue sharding (and many more)
  • 26. Built-In Exchange Types ❖ Direct
 String matching on the routing key ❖ Fanout
 No routing key, messages delivered to all bound queues ❖ Topic
 Pattern matching in the routing key ❖ Headers
 No routing key, value matching in the headers property
  • 27. Topic Exchange Binding Keys Routing Key: namespace.delimited.keys #
 Receive all messages namespace.#
 Receive all messages in namespace namespace.delimited.*
 Receive all namespace.delimited messages namespace.*.keys
 Receive all namespace messages ending with keys
  • 28. Exchange to Exchange Binding X X X Queue Queue Queue Queue Queue Queue Messages published into a topic exchange are routed to two other exchanges and a queue Messages published into the consistent-hashing exchange are distributed amongst three queues Messages published into a direct exchange routed to two queues P
  • 29. Alternate Exchanges P X Unroutable Messages X Unroutable messages are sent to an alternate exchange
  • 30. Dead Letter Exchanges P X Reject Queue Queue C X Consumer rejects the message without requeue Dead-Letter Exchange routes the message
  • 31. Exchange Plugins Consistent Hashing
 Distribute messages via hashed value of routing key Event
 Publishes messages on AMQP events such as queue creation Random
 Distribute messages across all bound queues randomly PostgreSQL LISTEN
 Subscribes to and publishes PostgreSQL notifications Recent History
 Sends the last n messages to any newly bound queue Reverse Topic
 Allows for routing patterns at publish time and not via binding Riak Storage
 Stores messages published through the exchange into Riak Script Exchange
 Calls out to external scripts for message routing
  • 34. Persisted Messages IO Model Disk Queue Message Queue Queue Messages with delivery-mode 2 sent into RabbitMQ are persisted to disk Pointers to the message are placed in the queue data structures When the message is no longer in a queue, it is removed from disk
  • 35. HA Queues & Performance Queue Queue Queue P RabbitMQ Cluster A publisher sends to any node in a RabbitMQ cluster The RabbitMQ servers in the cluster synchronize the state of the message in the queue The message that was published is put in the queue and is stored on each server
  • 38. Trending & Monitoring ❖ RabbitMQ Management Plugin provides internal stats ❖ Queue depths, connection counts, throughput, memory usage, etc ❖ Monitor with common tools such as Nagios or Sensu to services such as Boundary and NewRelic ❖ Stream based monitoring with Riemann for anomaly detection
  • 39. Thoughts on Configuration ❖ Use configuration management! ❖ Even for exchanges, queues, and bindings if possible ❖ Helpful for disaster recovery ❖ Use RabbitMQ’s Policies when possible ❖ Exchanges and queues are immutable ❖ Deleting and redeclaring for changes can be disruptive
  • 43. Listen for Database Notifications X Queue
  • 45. RPC C / PC / P P / C C / PResponse Queue X X Worker Queue Front-end web app receives a request Internet App publishes RPC request One of the subscribed worker consumers receives the RPC request After processing the request, the worker publishes the replyApp receives the reply from the response queue App replies to client
  • 46. Delayed Messages WARNING: This pattern is a hack and can cause undesirable situations should the wait queue overwhelm the system! P X X Wait Queue Ready Queue C The wait queue is declared with a message TTL and a dead-letter exchangeMessages that will be delivered later are routed to a wait queue When a message times out due to the TTL, it is published to the DLX The internally re-published message is routed to the queue with active consumers
  • 47. HA RabbitMQ with Federation Upstream Cluster A Queue A Queue B Upstream Cluster B Queue A Queue B Downstream Cluster A Queue A Queue B Downstream Cluster B Queue A Queue B HA Proxy 1 HA Proxy 2 P P P C A C B