RabbitMQ
« an AMQP Message Broker… »
Hassan BOUMARSEL
Java & Middleware Specialist
Hboumarsel @ anasys.fr
- 1 -
© ANASYS
Java & Middleware Specialists
ANASYS
Agenda
1. Introduction
2. Message Queue Fundamentals
3. AMQP Fundamentals
4. Introduction to RabbitMQ
5. RabbitMQ : Installation, Administration, and Configuration
- 3 -© ANASYS
Introduction
Messaging / Message-Oriented Middleware…
© ANASYS - 4 -
Introduction (Messaging)
Messaging… What does it all mean?
Route data from point A to point B (or “pubsub” push to many points C)
Decouple publishers and consumers
Queueing and buffering for later delivery
Asynchronous “hand off”
Load balancing and scalability
Monitoring and management
- 5 -© ANASYS
Introduction (Messaging) -2
Messaging is becoming ever more important because:
Scalability issues demand greater flexibility from application developers
Traditional synchronous programming models fair poorly at large scale
Cloud computing permits greater dynamic scaling than ever seen before, but
applications need to be written well to take advantage of this.
Messaging enables scaling by decoupling components and adding flexibility
There is an enormous range of applications and problems to which using
a messaging protocol is an effective solution
- 6 -© ANASYS
Introduction (Messaging) -3
- 7 -© ANASYS
Introduction (MOM)
The message-oriented architecture enables asynchronous and cross-
platform integration of applications.
Message-oriented middleware refers to an infrastructure that supports
messaging.
Typical message-oriented middleware architectures define the following
elements :
Message structure
The way to send and receive messages
Scaling guidelines
- 8 -© ANASYS
Introduction (MOM) -2
Point-To-Point Messaging :
- 9 -© ANASYS
Rep - A
Rep - B
Rep - C
3
1
2
Caller
(Producer)
Incoming Calls
queue
Message Broker
Messages are
delivered to one client.
Caller
(Producer)
Introduction (MOM) -3
Publish/Subscribe Messaging :
- 10 -© ANASYS
Distribution
topic
Message Broker
Publisher
Publisher
Messages are delivered
to multiple clients.
Subscriber
Subscriber
Subscriber
3 2 1
3 2 1
3 2 1
Message Queue Fundamentals
© ANASYS - 11 -
What is a MessageQueue?
“Mostly” First In First Out (FIFO) Queue
Message Queue Fundamentals
- 12 -© ANASYS
What is a MessageBroker?
RabbitMQ is a message broker.
Message Queue Fundamentals -2
- 13 -© ANASYS
Reliable message delivery for Publisher
● Durable queues
○ save messages to permanent storage
○ Important in recovery
● Non-Durable queues
○ Keep messages in-memory
○ Faster message throughput
○ Not every message needs persistence
Message Queue Fundamentals -3
- 14 -© ANASYS
Reliable message delivery for Consumer
● “Ack” ⇒ Acknowledgement
● Message removed from queue only after consumer “Ack”
● Use “Ack” to guarantee message is consumed properly
Message Queue Fundamentals -4
- 15 -© ANASYS
What if Consumer fails to process the message?
● “Nack” ⇒ No Acknowledgement
● Use “Nack” when consumer failed to handle messages
● Message redelivered to another consumer after “Nack”
Message Queue Fundamentals -5
- 16 -© ANASYS
Reliable Messaging Summary
● “Ack” ⇒ Acknowledge message
● “Nack” ⇒ No Acknowledgement
● Use “Ack/Nack” protocol to achieve reliability messaging
Message Queue Fundamentals -6
- 17 -© ANASYS
Tightly Coupled Processes
● Task A cannot send message to Task B if Task B is not
available to receive the message.
● ASSUMPTION: Task A does not need realtime
response from Task B.
What problems do Message Queues solve ?
- 18 -© ANASYS
Loosely Coupled Processes
Task A is not aware of Task B.
Communicates only with Message Queue.
What problems do Message Queues solve ? -2
- 19 -© ANASYS
Loosely Coupled Processes
Task B is not aware of Task A.
Communicates only with Message Queue.
What problems do Message Queues solve ? -3
- 20 -© ANASYS
Loosely Coupled Processes
Task A will send message to Message Queue.
Task B will EVENTUALLY get the message.
Both Tasks only communicates with Message Queue.
What problems do Message Queues solve ? -4
- 21 -© ANASYS
Typical Data Upload Workflow
What problems do Message Queues solve ? -5
© ANASYS - 22 -
Fast Publisher, Slow Consumer causesproblem
What problems do Message Queues solve ? -6
- 23 -© ANASYS
Message Queues make it morescalable
● Message Queue acts as a “buffer” for fast publisher and slow consumer.
What problems do Message Queues solve ? -7
© ANASYS - 24 -
Batch Processing
● Intraday Process runs multiple times throughout the
day.
● EOD (End of Day) Process runs once at a predefined
time.
● Example: Sending all pending orders to fulfillment
company.
What problems do Message Queues solve ? -8
- 25 -© ANASYS
Batch Processing Example
A Website takes User Orders and stores them in a Message Queue.
Message Queue acts as a reliable pending storage.
What problems do Message Queues solve ? -9
- 26 -© ANASYS
Batch Processing
End of Day Process will collect all pending User Orders and
send them downstream to the Fulfillment Center.
What problems do Message Queues solve ? -10
- 27 -© ANASYS
What problems do Message Queues solve ? -11
Example : A Notification Web Service
- 28 -© ANASYS
What problems do Message Queues solve ? -12
Example : A Notification Web Service
- 29 -© ANASYS
AMQP Fundamentals
© ANASYS - 30 -
AMQP Fundamentals
AMQP (Advanced Message Queuing Protocol) is an open standard
application layer protocol for message oriented middleware.
It is an open protocol (like TCP, HTTP, SMTP, and so on)
Set up by JPMorgan in 2006
The defining features of AMQP are:
Message orientation
Queuing
Routing (including point-to-point and publish-and-subscribe)
Reliability
Security
- 31 -© ANASYS
AMQP Fundamentals -2
AMQP was born of frustration…
Message oriented middleware needs to be everywhere in order to be
useful, but…
Traditionally dominant solutions are typically very proprietary
They are frequently too expensive for everyday use
They invariably do not interoperate
The result for a large enterprise is middleware hell
Hundred’s of applications, thousand’s of links
Every other connection is different
Massive waste of effort : Costly to implement / Costly and difficult to maintain
The Internet’s missing standard
- 32 -© ANASYS
AMQP Fundamentals -3
- 33 -© ANASYS
Message Format
AMQP Fundamentals -4
- 34 -© ANASYS
Message Properties
routing_key
ContentEncoding
ContentType
CorrelationId
DeliveryMode
Expiration
MessageId
ReplyTo
Timestamp
...Others..
AMQP Fundamentals -5
- 35 -© ANASYS
Message Headers
Map<String, Object> headers;
Values can be simple data types:
String
Long
Integer
Boolean
Double
Store user specific data outside of the message body
AMQP Fundamentals -5
- 36 -© ANASYS
Message Body
byte[] body;
Use to represent string or binary data
Keep the message body as lightweight as possible
Whole message must be transferred through the network
Big messages cause network congestion
Introduction to RabbitMQ
© ANASYS - 37 -
Introduction to RabbitMQ
- 38 -© ANASYS
RabbitMQ is a messagebroker
Introduction to RabbitMQ
RabbitMQ ⇒ message broker ⇒ accepts, stores and forwards messages
Server component written in Erlang programming language
Runs inside an Erlang runtime
A powerful Open Source message broker (message-oriented
middleware)
The leading implementation of AMQP
Provides a robust and flexible messaging platform designed to interoperate with other
messaging systems
- 39 -© ANASYS
Introduction to RabbitMQ
- 40 -© ANASYS
RabbitMQ Concepts
- 41 -© ANASYS
Producer: Application that sends the messages.
Consumer: Application that receives the messages.
Queue: Buffer that stores messages.
Message: Information that is sent from the producer to a consumer through RabbitMQ.
Connection: A connection is a TCP connection between your application and the
RabbitMQ broker.
Channel: A channel is a virtual connection inside a connection. When you are publishing
or consuming messages or subscribing to a queue, it is all done over a channel.
Exchange: Receives messages from producers and pushes them to queues depending
on rules defined by the exchange type. In order to receive messages, a queue needs to
be bound to at least one exchange.
RabbitMQ Concepts -2
- 42 -© ANASYS
Binding: A binding is a link between a queue and an exchange.
Routing key: The routing key is a key that the exchange looks at to decide how to route
the message to queues. The routing key is like an address for the message.
AMQP: AMQP (Advanced Message Queuing Protocol) is the main protocol used by
RabbitMQ for messaging.
Users: It is possible to connect to RabbitMQ with a given username and password.
Every user can be assigned permissions such as rights to read, write and configure
privileges within the instance.
RabbitMQ Management Interface
- 43 -© ANASYS
RabbitMQ Technologies
Exchanges:
These are the RabbitMQ server endpoints to which the clients will connect and send
messages.
Each endpoint is identified by a unique key.
Queues:
These are the RabbitMQ server components that buffer messages coming from one or
more exchanges and send them to the corresponding message receivers.
The messages in a queue can also be offloaded to a persistent storage (such queues
are also called durable queues) that provides a higher degree of reliability in case of a
failed messaging server;
Each queue is identified by a unique key.
- 44 -© ANASYS
RabbitMQ Technologies
Bindings :
These are the logical link between exchanges and queues.
Each binding is a rule that specifies how the exchanges should route messages to
queues.
A binding may have a routing key that can be used by clients in order to specify the
routing semantics of a message.
Virtual hosts:
The logical units that divide RabbitMQ server components (such as exchanges, queues,
and users) into separate groups for better administration and access control.
Each AMQP client connection is bound to a concrete virtual host..
- 45 -© ANASYS
RabbitMQ: Types of exchanges
- 46 -© ANASYS
Direct exchanges:
A direct exchange delivers messages to queues based on a message routing key.
Point to point messaging
A single message that needs to be sent to a single recipient
Can have multiple consumers (load will be balanced across them)
RabbitMQ: Types of exchanges -2
- 47 -© ANASYS
Fan-out exchange:
A fanout exchange routes messages to all of the queues that are bound to it.
A fan-out exchange is a “publish-subscribe” mechanism
Used to send a single message to multiple recipients (very similar to an email
distribution list)
Any queue bound to a fan-out exchange will receive any message sent to the
exchange
Message consumption of each queue
will be dependent on the number of consumers
and speed of message consumption
RabbitMQ: Types of exchanges -3
- 48 -© ANASYS
Headers:
Headers: Headers exchanges use the message header attributes for routing.
Topic exchange:
The topic exchange does a wildcard match between the routing key and the routing
pattern specified in the binding.
Content-based routing mechanism
Messages posted to queues based on binding pattern
Very powerful mechanism
RabbitMQ: How does it work ?
- 49 -© ANASYS
RabbitMQ: How does it work ?
- 50 -© ANASYS
RabbitMQ: How does it work ?
- 51 -© ANASYS
RabbitMQ: How does it work ?
- 52 -© ANASYS
RabbitMQ: How does it work ?
- 53 -© ANASYS
RabbitMQ: How does it work ?
- 54 -© ANASYS
RabbitMQ: How does it work ?
- 55 -© ANASYS
RabbitMQ: How does it work ?
- 56 -© ANASYS
RabbitMQ: How does it work ?
- 57 -© ANASYS
RabbitMQ: How does it work ?
- 58 -© ANASYS
RabbitMQ: How does it work ?
- 59 -© ANASYS
RabbitMQ: How does it work ?
- 60 -© ANASYS
RabbitMQ: How does it work ?
- 61 -© ANASYS
RabbitMQ: How does it work ?
- 62 -© ANASYS
RabbitMQ: How does it work ?
- 63 -© ANASYS
RabbitMQ: How does it work ?
- 64 -© ANASYS
RabbitMQ: How does it work ?
- 65 -© ANASYS
RabbitMQ: How does it work ?
- 66 -© ANASYS
RabbitMQ: How does it work ?
- 67 -© ANASYS
RabbitMQ: How does it work ?
- 68 -© ANASYS
RabbitMQ: How does it work ?
- 69 -© ANASYS
RabbitMQ: How does it work ?
- 70 -© ANASYS
RabbitMQ: How does it work ?
- 71 -© ANASYS
RabbitMQ: How does it work ?
- 72 -© ANASYS
RabbitMQ: How does it work ?
- 73 -© ANASYS
RabbitMQ: How does it work ?
- 74 -© ANASYS
RabbitMQ: How does it work ?
- 75 -© ANASYS
RabbitMQ Key Features
- 76 -© ANASYS
support for multiple protocols: Apart from AMQP, RabbitMQ provides support for the
STOMP, MQTT, and HTTP protocols by the means of RabbitMQ plug-ins.
routing capabilities: we can implement rules to route messages between exchanges
and queues by means of bindings.
support for multiple programming languages.
reliable delivery: This is a mechanism that guarantees successful message
delivery by the means of acknowledgements.
clustering: This provides a mechanism to implement scalable applications in terms of
the RabbitMQ message broker.
RabbitMQ Key Features -2
- 77 -© ANASYS
high availability: This ensures that if a broker fails, communication will be redirected to
a different broker instance. It is implemented by the means of mirroring queues.
management and monitoring: A number of utilities are built around the RabbitMQ
broker server that provide these capabilities..
Authentication and access control.
pluggable architecture: RabbitMQ provides a mechanism to extend its functionality by
the means of RabbitMQ plug-ins.
RabbitMQ Server Components
RabbitMQ essentially comprises the following components:
The RabbitMQ broker (supports AMQP 0.8 and 0.9.1, and supports AMQP 1.0 via a
plugin)
Adapters for HTTP, ZeroMQ, STOMP, MQTT, and other protocols
AMQP client libraries for Erlang, Java, .NET, and C/C++
AMQP clients for numerous other languages are available from other vendors and/or the
Open Source community
Large assortment of useful plugins
- 78 -© ANASYS
- 79 -
Who uses RabbitMQ?
Instagram - handle 4,000+ tasks and 10,000+ concurrent connections
VMWare - uses RabbitMQ in virtualization products
RedHat’s Cloud Services - uses RabbitMQ to coordinate internal
operations
JPMorgan, NSF, NASA, RedHat, OpenStack, AT&T, many others
© ANASYS
Why You Should Use RabbitMQ?
Message Oriented Middleware (MoM), Message Bus, Message Queues
Designed for Reliability and Scalability
Very matured product and actively worked on
Industry proven, used by big players
Based on AMQP standards
Open Source and FREE to use in commercial projects!
- 80 -© ANASYS
RabbitMQ : Installation
© ANASYS - 81 -
© ANASYS
Questions ?
Hassan BOUMARSEL
Java & Middleware Specialist
Contact

Rabbitmq an amqp message broker

  • 1.
    RabbitMQ « an AMQPMessage Broker… » Hassan BOUMARSEL Java & Middleware Specialist Hboumarsel @ anasys.fr - 1 - © ANASYS
  • 2.
  • 3.
    Agenda 1. Introduction 2. MessageQueue Fundamentals 3. AMQP Fundamentals 4. Introduction to RabbitMQ 5. RabbitMQ : Installation, Administration, and Configuration - 3 -© ANASYS
  • 4.
    Introduction Messaging / Message-OrientedMiddleware… © ANASYS - 4 -
  • 5.
    Introduction (Messaging) Messaging… Whatdoes it all mean? Route data from point A to point B (or “pubsub” push to many points C) Decouple publishers and consumers Queueing and buffering for later delivery Asynchronous “hand off” Load balancing and scalability Monitoring and management - 5 -© ANASYS
  • 6.
    Introduction (Messaging) -2 Messagingis becoming ever more important because: Scalability issues demand greater flexibility from application developers Traditional synchronous programming models fair poorly at large scale Cloud computing permits greater dynamic scaling than ever seen before, but applications need to be written well to take advantage of this. Messaging enables scaling by decoupling components and adding flexibility There is an enormous range of applications and problems to which using a messaging protocol is an effective solution - 6 -© ANASYS
  • 7.
  • 8.
    Introduction (MOM) The message-orientedarchitecture enables asynchronous and cross- platform integration of applications. Message-oriented middleware refers to an infrastructure that supports messaging. Typical message-oriented middleware architectures define the following elements : Message structure The way to send and receive messages Scaling guidelines - 8 -© ANASYS
  • 9.
    Introduction (MOM) -2 Point-To-PointMessaging : - 9 -© ANASYS Rep - A Rep - B Rep - C 3 1 2 Caller (Producer) Incoming Calls queue Message Broker Messages are delivered to one client. Caller (Producer)
  • 10.
    Introduction (MOM) -3 Publish/SubscribeMessaging : - 10 -© ANASYS Distribution topic Message Broker Publisher Publisher Messages are delivered to multiple clients. Subscriber Subscriber Subscriber 3 2 1 3 2 1 3 2 1
  • 11.
  • 12.
    What is aMessageQueue? “Mostly” First In First Out (FIFO) Queue Message Queue Fundamentals - 12 -© ANASYS
  • 13.
    What is aMessageBroker? RabbitMQ is a message broker. Message Queue Fundamentals -2 - 13 -© ANASYS
  • 14.
    Reliable message deliveryfor Publisher ● Durable queues ○ save messages to permanent storage ○ Important in recovery ● Non-Durable queues ○ Keep messages in-memory ○ Faster message throughput ○ Not every message needs persistence Message Queue Fundamentals -3 - 14 -© ANASYS
  • 15.
    Reliable message deliveryfor Consumer ● “Ack” ⇒ Acknowledgement ● Message removed from queue only after consumer “Ack” ● Use “Ack” to guarantee message is consumed properly Message Queue Fundamentals -4 - 15 -© ANASYS
  • 16.
    What if Consumerfails to process the message? ● “Nack” ⇒ No Acknowledgement ● Use “Nack” when consumer failed to handle messages ● Message redelivered to another consumer after “Nack” Message Queue Fundamentals -5 - 16 -© ANASYS
  • 17.
    Reliable Messaging Summary ●“Ack” ⇒ Acknowledge message ● “Nack” ⇒ No Acknowledgement ● Use “Ack/Nack” protocol to achieve reliability messaging Message Queue Fundamentals -6 - 17 -© ANASYS
  • 18.
    Tightly Coupled Processes ●Task A cannot send message to Task B if Task B is not available to receive the message. ● ASSUMPTION: Task A does not need realtime response from Task B. What problems do Message Queues solve ? - 18 -© ANASYS
  • 19.
    Loosely Coupled Processes TaskA is not aware of Task B. Communicates only with Message Queue. What problems do Message Queues solve ? -2 - 19 -© ANASYS
  • 20.
    Loosely Coupled Processes TaskB is not aware of Task A. Communicates only with Message Queue. What problems do Message Queues solve ? -3 - 20 -© ANASYS
  • 21.
    Loosely Coupled Processes TaskA will send message to Message Queue. Task B will EVENTUALLY get the message. Both Tasks only communicates with Message Queue. What problems do Message Queues solve ? -4 - 21 -© ANASYS
  • 22.
    Typical Data UploadWorkflow What problems do Message Queues solve ? -5 © ANASYS - 22 -
  • 23.
    Fast Publisher, SlowConsumer causesproblem What problems do Message Queues solve ? -6 - 23 -© ANASYS
  • 24.
    Message Queues makeit morescalable ● Message Queue acts as a “buffer” for fast publisher and slow consumer. What problems do Message Queues solve ? -7 © ANASYS - 24 -
  • 25.
    Batch Processing ● IntradayProcess runs multiple times throughout the day. ● EOD (End of Day) Process runs once at a predefined time. ● Example: Sending all pending orders to fulfillment company. What problems do Message Queues solve ? -8 - 25 -© ANASYS
  • 26.
    Batch Processing Example AWebsite takes User Orders and stores them in a Message Queue. Message Queue acts as a reliable pending storage. What problems do Message Queues solve ? -9 - 26 -© ANASYS
  • 27.
    Batch Processing End ofDay Process will collect all pending User Orders and send them downstream to the Fulfillment Center. What problems do Message Queues solve ? -10 - 27 -© ANASYS
  • 28.
    What problems doMessage Queues solve ? -11 Example : A Notification Web Service - 28 -© ANASYS
  • 29.
    What problems doMessage Queues solve ? -12 Example : A Notification Web Service - 29 -© ANASYS
  • 30.
  • 31.
    AMQP Fundamentals AMQP (AdvancedMessage Queuing Protocol) is an open standard application layer protocol for message oriented middleware. It is an open protocol (like TCP, HTTP, SMTP, and so on) Set up by JPMorgan in 2006 The defining features of AMQP are: Message orientation Queuing Routing (including point-to-point and publish-and-subscribe) Reliability Security - 31 -© ANASYS
  • 32.
    AMQP Fundamentals -2 AMQPwas born of frustration… Message oriented middleware needs to be everywhere in order to be useful, but… Traditionally dominant solutions are typically very proprietary They are frequently too expensive for everyday use They invariably do not interoperate The result for a large enterprise is middleware hell Hundred’s of applications, thousand’s of links Every other connection is different Massive waste of effort : Costly to implement / Costly and difficult to maintain The Internet’s missing standard - 32 -© ANASYS
  • 33.
    AMQP Fundamentals -3 -33 -© ANASYS Message Format
  • 34.
    AMQP Fundamentals -4 -34 -© ANASYS Message Properties routing_key ContentEncoding ContentType CorrelationId DeliveryMode Expiration MessageId ReplyTo Timestamp ...Others..
  • 35.
    AMQP Fundamentals -5 -35 -© ANASYS Message Headers Map<String, Object> headers; Values can be simple data types: String Long Integer Boolean Double Store user specific data outside of the message body
  • 36.
    AMQP Fundamentals -5 -36 -© ANASYS Message Body byte[] body; Use to represent string or binary data Keep the message body as lightweight as possible Whole message must be transferred through the network Big messages cause network congestion
  • 37.
  • 38.
    Introduction to RabbitMQ -38 -© ANASYS RabbitMQ is a messagebroker
  • 39.
    Introduction to RabbitMQ RabbitMQ⇒ message broker ⇒ accepts, stores and forwards messages Server component written in Erlang programming language Runs inside an Erlang runtime A powerful Open Source message broker (message-oriented middleware) The leading implementation of AMQP Provides a robust and flexible messaging platform designed to interoperate with other messaging systems - 39 -© ANASYS
  • 40.
  • 41.
    RabbitMQ Concepts - 41-© ANASYS Producer: Application that sends the messages. Consumer: Application that receives the messages. Queue: Buffer that stores messages. Message: Information that is sent from the producer to a consumer through RabbitMQ. Connection: A connection is a TCP connection between your application and the RabbitMQ broker. Channel: A channel is a virtual connection inside a connection. When you are publishing or consuming messages or subscribing to a queue, it is all done over a channel. Exchange: Receives messages from producers and pushes them to queues depending on rules defined by the exchange type. In order to receive messages, a queue needs to be bound to at least one exchange.
  • 42.
    RabbitMQ Concepts -2 -42 -© ANASYS Binding: A binding is a link between a queue and an exchange. Routing key: The routing key is a key that the exchange looks at to decide how to route the message to queues. The routing key is like an address for the message. AMQP: AMQP (Advanced Message Queuing Protocol) is the main protocol used by RabbitMQ for messaging. Users: It is possible to connect to RabbitMQ with a given username and password. Every user can be assigned permissions such as rights to read, write and configure privileges within the instance.
  • 43.
  • 44.
    RabbitMQ Technologies Exchanges: These arethe RabbitMQ server endpoints to which the clients will connect and send messages. Each endpoint is identified by a unique key. Queues: These are the RabbitMQ server components that buffer messages coming from one or more exchanges and send them to the corresponding message receivers. The messages in a queue can also be offloaded to a persistent storage (such queues are also called durable queues) that provides a higher degree of reliability in case of a failed messaging server; Each queue is identified by a unique key. - 44 -© ANASYS
  • 45.
    RabbitMQ Technologies Bindings : Theseare the logical link between exchanges and queues. Each binding is a rule that specifies how the exchanges should route messages to queues. A binding may have a routing key that can be used by clients in order to specify the routing semantics of a message. Virtual hosts: The logical units that divide RabbitMQ server components (such as exchanges, queues, and users) into separate groups for better administration and access control. Each AMQP client connection is bound to a concrete virtual host.. - 45 -© ANASYS
  • 46.
    RabbitMQ: Types ofexchanges - 46 -© ANASYS Direct exchanges: A direct exchange delivers messages to queues based on a message routing key. Point to point messaging A single message that needs to be sent to a single recipient Can have multiple consumers (load will be balanced across them)
  • 47.
    RabbitMQ: Types ofexchanges -2 - 47 -© ANASYS Fan-out exchange: A fanout exchange routes messages to all of the queues that are bound to it. A fan-out exchange is a “publish-subscribe” mechanism Used to send a single message to multiple recipients (very similar to an email distribution list) Any queue bound to a fan-out exchange will receive any message sent to the exchange Message consumption of each queue will be dependent on the number of consumers and speed of message consumption
  • 48.
    RabbitMQ: Types ofexchanges -3 - 48 -© ANASYS Headers: Headers: Headers exchanges use the message header attributes for routing. Topic exchange: The topic exchange does a wildcard match between the routing key and the routing pattern specified in the binding. Content-based routing mechanism Messages posted to queues based on binding pattern Very powerful mechanism
  • 49.
    RabbitMQ: How doesit work ? - 49 -© ANASYS
  • 50.
    RabbitMQ: How doesit work ? - 50 -© ANASYS
  • 51.
    RabbitMQ: How doesit work ? - 51 -© ANASYS
  • 52.
    RabbitMQ: How doesit work ? - 52 -© ANASYS
  • 53.
    RabbitMQ: How doesit work ? - 53 -© ANASYS
  • 54.
    RabbitMQ: How doesit work ? - 54 -© ANASYS
  • 55.
    RabbitMQ: How doesit work ? - 55 -© ANASYS
  • 56.
    RabbitMQ: How doesit work ? - 56 -© ANASYS
  • 57.
    RabbitMQ: How doesit work ? - 57 -© ANASYS
  • 58.
    RabbitMQ: How doesit work ? - 58 -© ANASYS
  • 59.
    RabbitMQ: How doesit work ? - 59 -© ANASYS
  • 60.
    RabbitMQ: How doesit work ? - 60 -© ANASYS
  • 61.
    RabbitMQ: How doesit work ? - 61 -© ANASYS
  • 62.
    RabbitMQ: How doesit work ? - 62 -© ANASYS
  • 63.
    RabbitMQ: How doesit work ? - 63 -© ANASYS
  • 64.
    RabbitMQ: How doesit work ? - 64 -© ANASYS
  • 65.
    RabbitMQ: How doesit work ? - 65 -© ANASYS
  • 66.
    RabbitMQ: How doesit work ? - 66 -© ANASYS
  • 67.
    RabbitMQ: How doesit work ? - 67 -© ANASYS
  • 68.
    RabbitMQ: How doesit work ? - 68 -© ANASYS
  • 69.
    RabbitMQ: How doesit work ? - 69 -© ANASYS
  • 70.
    RabbitMQ: How doesit work ? - 70 -© ANASYS
  • 71.
    RabbitMQ: How doesit work ? - 71 -© ANASYS
  • 72.
    RabbitMQ: How doesit work ? - 72 -© ANASYS
  • 73.
    RabbitMQ: How doesit work ? - 73 -© ANASYS
  • 74.
    RabbitMQ: How doesit work ? - 74 -© ANASYS
  • 75.
    RabbitMQ: How doesit work ? - 75 -© ANASYS
  • 76.
    RabbitMQ Key Features -76 -© ANASYS support for multiple protocols: Apart from AMQP, RabbitMQ provides support for the STOMP, MQTT, and HTTP protocols by the means of RabbitMQ plug-ins. routing capabilities: we can implement rules to route messages between exchanges and queues by means of bindings. support for multiple programming languages. reliable delivery: This is a mechanism that guarantees successful message delivery by the means of acknowledgements. clustering: This provides a mechanism to implement scalable applications in terms of the RabbitMQ message broker.
  • 77.
    RabbitMQ Key Features-2 - 77 -© ANASYS high availability: This ensures that if a broker fails, communication will be redirected to a different broker instance. It is implemented by the means of mirroring queues. management and monitoring: A number of utilities are built around the RabbitMQ broker server that provide these capabilities.. Authentication and access control. pluggable architecture: RabbitMQ provides a mechanism to extend its functionality by the means of RabbitMQ plug-ins.
  • 78.
    RabbitMQ Server Components RabbitMQessentially comprises the following components: The RabbitMQ broker (supports AMQP 0.8 and 0.9.1, and supports AMQP 1.0 via a plugin) Adapters for HTTP, ZeroMQ, STOMP, MQTT, and other protocols AMQP client libraries for Erlang, Java, .NET, and C/C++ AMQP clients for numerous other languages are available from other vendors and/or the Open Source community Large assortment of useful plugins - 78 -© ANASYS
  • 79.
    - 79 - Whouses RabbitMQ? Instagram - handle 4,000+ tasks and 10,000+ concurrent connections VMWare - uses RabbitMQ in virtualization products RedHat’s Cloud Services - uses RabbitMQ to coordinate internal operations JPMorgan, NSF, NASA, RedHat, OpenStack, AT&T, many others © ANASYS
  • 80.
    Why You ShouldUse RabbitMQ? Message Oriented Middleware (MoM), Message Bus, Message Queues Designed for Reliability and Scalability Very matured product and actively worked on Industry proven, used by big players Based on AMQP standards Open Source and FREE to use in commercial projects! - 80 -© ANASYS
  • 81.
  • 82.
  • 83.
  • 84.
    Hassan BOUMARSEL Java &Middleware Specialist Contact