Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Randhir Kumar
Software Consultant
Knoldus Inc.
Introduction to
RabbitMQ
06 Demo
Our Agenda
01 Why Messaging System
02 AMQP Overview
03 RabbitMQ Overview
04 RabbitMQ Message Flow
05 Types of Exch...
Why Messaging System
BUSINESS
PLAN
Loose
couping
between
modules
Queuing
data for
later
delivery
Asynchronou
s processing
...
AMQP Overview
● AMQP (Advanced Message Queuing Protocol) is a messaging protocol that enables
conforming client applicatio...
AMQP Overview
● Connection :- A connection is a TCP connection between your application and the RabbitMQ
broker. AMQP is a...
RabbitMQ Overview
● An Open source message broker written in Erlang
● Implements the AMQP Protocol(Advanced message Queuin...
RabbitMQ
Message Flow
The producer publishes a message to the
exchange
01
02
03
Image Placeholder
04
05
The exchange recei...
Direct
Exchange
Image Placeholder
A direct exchange delivers messages to queues
based on the message routing key. A direct...
Default Exchange
Image Placeholder
The default exchange is a direct exchange with no name (empty string) pre-declared by t...
Fanout
Exchange
Image Placeholder
A fanout exchange routes messages to all of
the queues that are bound to it and the rout...
Topic
Exchange
Image Placeholder
Topic exchanges route messages to one
or many queues based on matching
between a message ...
Header
Exchange
Image Placeholder
Headers exchanges ignore the routing key
attribute.A headers exchange is an exchange
whi...
REFERENCES
● https://www.cloudamqp.com/blog/2015-09-03-part4-rabbitmq-for-beginners-exchanges-
routing-keys-bindings.html
...
Thank You !
Upcoming SlideShare
Loading in …5
×

Introduction To RabbitMQ

116 views

Published on

RabbitMQ is an open source message-broker software that originally implemented the Advanced Message Queuing Protocol (AMQP).it accepts and forwards messages.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Introduction To RabbitMQ

  1. 1. Randhir Kumar Software Consultant Knoldus Inc. Introduction to RabbitMQ
  2. 2. 06 Demo Our Agenda 01 Why Messaging System 02 AMQP Overview 03 RabbitMQ Overview 04 RabbitMQ Message Flow 05 Types of Exchange
  3. 3. Why Messaging System BUSINESS PLAN Loose couping between modules Queuing data for later delivery Asynchronou s processing Reliable load balancing
  4. 4. AMQP Overview ● AMQP (Advanced Message Queuing Protocol) is a messaging protocol that enables conforming client applications to communicate with conforming messaging middleware brokers ● Messaging brokers receive messages from publisher and route them to consumers. ● Since It is a network protocol, the publishers, consumers and the broker can all reside on different machines. ● A producer is a user application that sends messages. ● A queue is a buffer that stores messages. ● A consumer is a user application that receives messages.
  5. 5. AMQP Overview ● Connection :- A connection is a TCP connection between your application and the RabbitMQ broker. AMQP is an application level protocol that uses TCP for reliable delivery ● Channel :- A channel is a virtual connection inside a connection. When you are publishing or consuming messages from a queue – it’s all done over a channel. ● Routing Key: Routing keybinding with the queue are ruled that allow the exchange to put messages into the queue. ● Exchange: The exchange receives messages from the producer and from the other side it pushes them to the queues. ● Binding : : A binding is a "link" that you set up to bind a queue to an exchange.
  6. 6. RabbitMQ Overview ● An Open source message broker written in Erlang ● Implements the AMQP Protocol(Advanced message Queuing protocol)
  7. 7. RabbitMQ Message Flow The producer publishes a message to the exchange 01 02 03 Image Placeholder 04 05 The exchange receives the message and is now responsible for the routing of the message. A binding has to be set up between the queue and the exchange. The messages stay in the queue until they are handled by a consumer The consumer handles the message.
  8. 8. Direct Exchange Image Placeholder A direct exchange delivers messages to queues based on the message routing key. A direct exchange is ideal for the unicast routing of messages
  9. 9. Default Exchange Image Placeholder The default exchange is a direct exchange with no name (empty string) pre-declared by the broker. It has one special property that makes it very useful for simple applications: every queue that is created is automatically bound to it with a routing key which is the same as the queue name. For example, when you declare a queue with the name of "search-indexing-online", the AMQP 0-9-1 broker will bind it to the default exchange using "search-indexing-online" as the routing key (in this context sometimes referred to as the binding key). Therefore, a message published to the default exchange with the routing key "search-indexing-online" will be routed to the queue "search-indexing-online". In other words, the default exchange makes it seem like it is possible to deliver messages directly to queues, even though that is not technically what is happening.
  10. 10. Fanout Exchange Image Placeholder A fanout exchange routes messages to all of the queues that are bound to it and the routing key is ignored. If N queues are bound to a fanout exchange, when a new message is published to that exchange a copy of the message is delivered to all N queues. Fanout exchanges are ideal for the broadcast routing of messages
  11. 11. Topic Exchange Image Placeholder Topic exchanges route messages to one or many queues based on matching between a message routing key and the pattern that was used to bind a queue to an exchangeTopic exchanges are commonly used for the multicast routing of messages.
  12. 12. Header Exchange Image Placeholder Headers exchanges ignore the routing key attribute.A headers exchange is an exchange which routes messages to queues based on message header values.
  13. 13. REFERENCES ● https://www.cloudamqp.com/blog/2015-09-03-part4-rabbitmq-for-beginners-exchanges- routing-keys-bindings.html ● https://www.rabbitmq.com/ ● https://github.com/randhir1910/RabbitMQ-Java ● https://github.com/randhir1910/RabbitMQ-In-Scala
  14. 14. Thank You !

×