2. WHAT IS RABBITMQ
RabbitMQ is a messaging broker
an intermediary for messaging
Gives your applications a common platform to send
and receive messages
a safe place to live until received.
7/12/2013
2
RabbitMQ–Messagingthatjustworks…
3. NEED OF MESSAGING
Messaging enables software applications to
connect and scale
Different Component of application can
connect to each other
Messaging is Asynchronous
Decoupling of applications
Queuing for delivery
Scalability
Monitor data feeds
7/12/2013
3
RabbitMQ–Messagingthatjustworks…
8. QUEUES
Name
Durable (the queue will survive a broker restart)
Exclusive (used by only one connection and the
queue will be deleted when that connection closes)
Auto-delete (queue is deleted when last consumer
unsubscribes)
Arguments (some brokers use it to implement
additional features like message TTL)
7/12/2013
8
RabbitMQ–Messagingthatjustworks…
9. MESSAGES
Can be persistent
Can have a priority level
Message – body +headers
Broker never modifies content of message
7/12/2013
9
RabbitMQ–Messagingthatjustworks…
10. CONNECTIONS
AMQP connections are typically long-lived
TCP Connection
7/12/2013
10
RabbitMQ–Messagingthatjustworks…
Channels
• Connections are multiplexed
• lightweight connections that share a single TCP
connection
• Communication on a particular channel is completely
separate from communication on another channel
12. PUBLISHER CONFIRMATION
Transaction mode –take more than 4 messages to
publish 10000 messages
Required fsync() both sides
Publisher Confirmation mode: 100 times faster than
transaction – asynchronous
Messages published are put in a set they are
queued only when they receive ack
7/12/2013
12
RabbitMQ–Messagingthatjustworks…
14. CLUSTERING
Clustering connects multiple machines together to
form a single logical broker
Communication is via Erlang message-passing, so
all nodes in the cluster must have the same Erlang
cookie
and all machines in the cluster must run the same
versions of RabbitMQ and Erlang.
Virtual hosts, exchanges, users, and permissions
are automatically mirrored across all nodes in a
cluster.
A client connecting to any node in a cluster can see
all queues in the cluster, even if they are not
located on that node.
7/12/2013
14
RabbitMQ–Messagingthatjustworks…
16. MIRRORING QUEUES/HIGH AVAILIBILITY
Thus clients consuming from a mirrored queue are
in fact consuming from the master.
Publish happens on all queues
No concept of master/slave for publishing activity
In case of failure – message loss from master in
case of unsynchronysation
Redelivery of messages in case of master failure
7/12/2013
16
RabbitMQ–Messagingthatjustworks…
17. OTHER FEATURES OF RABBITMQ
Federation
Shovel
Tracing
Management ui etc
7/12/2013
17
RabbitMQ–Messagingthatjustworks…
18. RABBITMQ USERS
Barclays Bank PLC
Cisco Systems, Inc.
Credit Suisse
Deutsche Börse Systems
Envoy Technologies Inc.
Goldman Sachs
iMatix Corporation
IONA Technologies
JPMorgan Chase Bank & Co.
7/12/2013
18
RabbitMQ–Messagingthatjustworks…
• Microsoft Corporation
• Novell
• Rabbit Technologies, a joint venture of
CohesiveFT and LShift
• Red Hat, Inc.
• Solace Systems, Inc.
• Tervela, Inc.
• TWST Process Innovations
• WSO2, Inc.
• 29West Inc.