SlideShare una empresa de Scribd logo
1 de 84
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQKnoldus Inc.
 
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
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging QueuesNaukri.com
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPEberhard Wolff
 
19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQWoo Young Choi
 
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...confluent
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache KafkaJeff Holoman
 
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQAn Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQRavi Yogesh
 
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 Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQAll Things Open
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013mumrah
 
IBM MQ Overview (IBM Message Queue)
IBM MQ Overview (IBM Message Queue)IBM MQ Overview (IBM Message Queue)
IBM MQ Overview (IBM Message Queue)Juarez Junior
 
Message Oriented Middleware (MOM)
Message Oriented Middleware (MOM)Message Oriented Middleware (MOM)
Message Oriented Middleware (MOM)drewenut
 
Rabbitmq & Kafka Presentation
Rabbitmq & Kafka PresentationRabbitmq & Kafka Presentation
Rabbitmq & Kafka PresentationEmre Gündoğdu
 

La actualidad más candente (20)

Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQ
 
Message Broker System and RabbitMQ
Message Broker System and RabbitMQMessage Broker System and RabbitMQ
Message Broker System and RabbitMQ
 
What is RabbitMQ ?
What is RabbitMQ ?What is RabbitMQ ?
What is RabbitMQ ?
 
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
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
 
AMQP 1.0 introduction
AMQP 1.0 introductionAMQP 1.0 introduction
AMQP 1.0 introduction
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
 
19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ
 
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
 
AMQP
AMQPAMQP
AMQP
 
RabbitMQ & Kafka
RabbitMQ & KafkaRabbitMQ & Kafka
RabbitMQ & Kafka
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQAn Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
 
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 Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
 
IBM MQ Overview (IBM Message Queue)
IBM MQ Overview (IBM Message Queue)IBM MQ Overview (IBM Message Queue)
IBM MQ Overview (IBM Message Queue)
 
Message Oriented Middleware (MOM)
Message Oriented Middleware (MOM)Message Oriented Middleware (MOM)
Message Oriented Middleware (MOM)
 
Amqp Basic
Amqp BasicAmqp Basic
Amqp Basic
 
Rabbitmq & Kafka Presentation
Rabbitmq & Kafka PresentationRabbitmq & Kafka Presentation
Rabbitmq & Kafka Presentation
 

Destacado

RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data IngestionAlvaro Videla
 
Introduction to RabbitMQ | Meetup at Pivotal Labs
Introduction to RabbitMQ | Meetup at Pivotal LabsIntroduction to RabbitMQ | Meetup at Pivotal Labs
Introduction to RabbitMQ | Meetup at Pivotal LabsAlvaro Videla
 
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
 
MongoUK 2011 - Rplacing RabbitMQ with MongoDB
MongoUK 2011 - Rplacing RabbitMQ with MongoDBMongoUK 2011 - Rplacing RabbitMQ with MongoDB
MongoUK 2011 - Rplacing RabbitMQ with MongoDBBoxed Ice
 
10 Ways Your Boss Kills Employee Motivation
10 Ways Your Boss Kills Employee Motivation10 Ways Your Boss Kills Employee Motivation
10 Ways Your Boss Kills Employee MotivationOfficevibe
 
Top 5 Deep Learning and AI Stories - October 6, 2017
Top 5 Deep Learning and AI Stories - October 6, 2017Top 5 Deep Learning and AI Stories - October 6, 2017
Top 5 Deep Learning and AI Stories - October 6, 2017NVIDIA
 

Destacado (7)

RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data Ingestion
 
Introduction to RabbitMQ | Meetup at Pivotal Labs
Introduction to RabbitMQ | Meetup at Pivotal LabsIntroduction to RabbitMQ | Meetup at Pivotal Labs
Introduction to RabbitMQ | Meetup at Pivotal Labs
 
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
 
MongoUK 2011 - Rplacing RabbitMQ with MongoDB
MongoUK 2011 - Rplacing RabbitMQ with MongoDBMongoUK 2011 - Rplacing RabbitMQ with MongoDB
MongoUK 2011 - Rplacing RabbitMQ with MongoDB
 
dubizzle's Guide to RabbitMQ
dubizzle's Guide to RabbitMQdubizzle's Guide to RabbitMQ
dubizzle's Guide to RabbitMQ
 
10 Ways Your Boss Kills Employee Motivation
10 Ways Your Boss Kills Employee Motivation10 Ways Your Boss Kills Employee Motivation
10 Ways Your Boss Kills Employee Motivation
 
Top 5 Deep Learning and AI Stories - October 6, 2017
Top 5 Deep Learning and AI Stories - October 6, 2017Top 5 Deep Learning and AI Stories - October 6, 2017
Top 5 Deep Learning and AI Stories - October 6, 2017
 

Similar a RabbitMQ: An AMQP Message Broker

ZendCon - Integration and Asynchronous Processing with ActiveMQ and Camel
ZendCon - Integration and Asynchronous Processing with ActiveMQ and CamelZendCon - Integration and Asynchronous Processing with ActiveMQ and Camel
ZendCon - Integration and Asynchronous Processing with ActiveMQ and CamelJustin Reock
 
ActiveMQ interview Questions and Answers
ActiveMQ interview Questions and AnswersActiveMQ interview Questions and Answers
ActiveMQ interview Questions and Answersjeetendra mandal
 
Velocity Conference '13: Asynchronous messaging for performance optimization,...
Velocity Conference '13: Asynchronous messaging for performance optimization,...Velocity Conference '13: Asynchronous messaging for performance optimization,...
Velocity Conference '13: Asynchronous messaging for performance optimization,...Al Sargent
 
IBM MQ High Availability 2019
IBM MQ High Availability 2019IBM MQ High Availability 2019
IBM MQ High Availability 2019David Ware
 
Connecting IBM MessageSight to the Enterprise
Connecting IBM MessageSight to the EnterpriseConnecting IBM MessageSight to the Enterprise
Connecting IBM MessageSight to the EnterpriseAndrew Schofield
 
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...Peter Broadhurst
 
f2f-overview12.ppt
f2f-overview12.pptf2f-overview12.ppt
f2f-overview12.pptwentaozhu3
 
f2f-overview1-presentation about rabbitmq and middleware
f2f-overview1-presentation about rabbitmq and middlewaref2f-overview1-presentation about rabbitmq and middleware
f2f-overview1-presentation about rabbitmq and middlewarendonikristi98
 
RabbitMQ interview Questions and Answers
RabbitMQ interview Questions and AnswersRabbitMQ interview Questions and Answers
RabbitMQ interview Questions and Answersjeetendra mandal
 
Reliable Messaging /Guaranteed delivery
Reliable Messaging /Guaranteed deliveryReliable Messaging /Guaranteed delivery
Reliable Messaging /Guaranteed deliveryWSO2
 
NServiceBus workshop presentation
NServiceBus workshop presentationNServiceBus workshop presentation
NServiceBus workshop presentationTomas Jansson
 
IBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ ClustersIBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ ClustersIBM Systems UKI
 
Introduction to NServiceBus
Introduction to NServiceBusIntroduction to NServiceBus
Introduction to NServiceBusEspen Ekvang
 
Low Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTTLow Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTTHenrik Sjöstrand
 
Connecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQConnecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQRob Davies
 
WSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2
 

Similar a RabbitMQ: An AMQP Message Broker (20)

ZendCon - Integration and Asynchronous Processing with ActiveMQ and Camel
ZendCon - Integration and Asynchronous Processing with ActiveMQ and CamelZendCon - Integration and Asynchronous Processing with ActiveMQ and Camel
ZendCon - Integration and Asynchronous Processing with ActiveMQ and Camel
 
ActiveMQ interview Questions and Answers
ActiveMQ interview Questions and AnswersActiveMQ interview Questions and Answers
ActiveMQ interview Questions and Answers
 
Velocity Conference '13: Asynchronous messaging for performance optimization,...
Velocity Conference '13: Asynchronous messaging for performance optimization,...Velocity Conference '13: Asynchronous messaging for performance optimization,...
Velocity Conference '13: Asynchronous messaging for performance optimization,...
 
IBM MQ High Availability 2019
IBM MQ High Availability 2019IBM MQ High Availability 2019
IBM MQ High Availability 2019
 
Connecting IBM MessageSight to the Enterprise
Connecting IBM MessageSight to the EnterpriseConnecting IBM MessageSight to the Enterprise
Connecting IBM MessageSight to the Enterprise
 
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
 
f2f-overview12.ppt
f2f-overview12.pptf2f-overview12.ppt
f2f-overview12.ppt
 
f2f-overview1-presentation about rabbitmq and middleware
f2f-overview1-presentation about rabbitmq and middlewaref2f-overview1-presentation about rabbitmq and middleware
f2f-overview1-presentation about rabbitmq and middleware
 
RabbitMQ Status Quo Critical Review
RabbitMQ Status Quo Critical ReviewRabbitMQ Status Quo Critical Review
RabbitMQ Status Quo Critical Review
 
RabbitMQ interview Questions and Answers
RabbitMQ interview Questions and AnswersRabbitMQ interview Questions and Answers
RabbitMQ interview Questions and Answers
 
RabbitMQ.pptx
RabbitMQ.pptxRabbitMQ.pptx
RabbitMQ.pptx
 
Reliable Messaging /Guaranteed delivery
Reliable Messaging /Guaranteed deliveryReliable Messaging /Guaranteed delivery
Reliable Messaging /Guaranteed delivery
 
NServiceBus workshop presentation
NServiceBus workshop presentationNServiceBus workshop presentation
NServiceBus workshop presentation
 
IBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ ClustersIBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ Clusters
 
Message oriented middleware
Message oriented middlewareMessage oriented middleware
Message oriented middleware
 
zeromq
zeromqzeromq
zeromq
 
Introduction to NServiceBus
Introduction to NServiceBusIntroduction to NServiceBus
Introduction to NServiceBus
 
Low Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTTLow Latency Mobile Messaging using MQTT
Low Latency Mobile Messaging using MQTT
 
Connecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQConnecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQ
 
WSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2 Message Broker - Product Overview
WSO2 Message Broker - Product Overview
 

Último

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 

Último (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 

RabbitMQ: An AMQP Message Broker

  • 1. RabbitMQ « an AMQP Message Broker… » Hassan BOUMARSEL Java & Middleware Specialist Hboumarsel @ anasys.fr - 1 - © ANASYS
  • 3. Agenda 1. Introduction 2. Message Queue Fundamentals 3. AMQP Fundamentals 4. Introduction to RabbitMQ 5. RabbitMQ : Installation, Administration, and Configuration - 3 -© ANASYS
  • 4. Introduction Messaging / Message-Oriented Middleware… © ANASYS - 4 -
  • 5. 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
  • 6. 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
  • 8. 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
  • 9. 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)
  • 10. 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
  • 12. What is a MessageQueue? “Mostly” First In First Out (FIFO) Queue Message Queue Fundamentals - 12 -© ANASYS
  • 13. What is a MessageBroker? RabbitMQ is a message broker. Message Queue Fundamentals -2 - 13 -© ANASYS
  • 14. 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
  • 15. 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
  • 16. 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
  • 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 Task A is not aware of Task B. Communicates only with Message Queue. What problems do Message Queues solve ? -2 - 19 -© ANASYS
  • 20. 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
  • 21. 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
  • 22. Typical Data Upload Workflow What problems do Message Queues solve ? -5 © ANASYS - 22 -
  • 23. Fast Publisher, Slow Consumer causesproblem What problems do Message Queues solve ? -6 - 23 -© ANASYS
  • 24. 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 -
  • 25. 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
  • 26. 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
  • 27. 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
  • 28. What problems do Message Queues solve ? -11 Example : A Notification Web Service - 28 -© ANASYS
  • 29. What problems do Message Queues solve ? -12 Example : A Notification Web Service - 29 -© ANASYS
  • 31. 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
  • 32. 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
  • 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
  • 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. Introduction to RabbitMQ - 40 -© ANASYS
  • 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.
  • 44. 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
  • 45. 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
  • 46. 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)
  • 47. 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
  • 48. 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
  • 49. RabbitMQ: How does it work ? - 49 -© ANASYS
  • 50. RabbitMQ: How does it work ? - 50 -© ANASYS
  • 51. RabbitMQ: How does it work ? - 51 -© ANASYS
  • 52. RabbitMQ: How does it work ? - 52 -© ANASYS
  • 53. RabbitMQ: How does it work ? - 53 -© ANASYS
  • 54. RabbitMQ: How does it work ? - 54 -© ANASYS
  • 55. RabbitMQ: How does it work ? - 55 -© ANASYS
  • 56. RabbitMQ: How does it work ? - 56 -© ANASYS
  • 57. RabbitMQ: How does it work ? - 57 -© ANASYS
  • 58. RabbitMQ: How does it work ? - 58 -© ANASYS
  • 59. RabbitMQ: How does it work ? - 59 -© ANASYS
  • 60. RabbitMQ: How does it work ? - 60 -© ANASYS
  • 61. RabbitMQ: How does it work ? - 61 -© ANASYS
  • 62. RabbitMQ: How does it work ? - 62 -© ANASYS
  • 63. RabbitMQ: How does it work ? - 63 -© ANASYS
  • 64. RabbitMQ: How does it work ? - 64 -© ANASYS
  • 65. RabbitMQ: How does it work ? - 65 -© ANASYS
  • 66. RabbitMQ: How does it work ? - 66 -© ANASYS
  • 67. RabbitMQ: How does it work ? - 67 -© ANASYS
  • 68. RabbitMQ: How does it work ? - 68 -© ANASYS
  • 69. RabbitMQ: How does it work ? - 69 -© ANASYS
  • 70. RabbitMQ: How does it work ? - 70 -© ANASYS
  • 71. RabbitMQ: How does it work ? - 71 -© ANASYS
  • 72. RabbitMQ: How does it work ? - 72 -© ANASYS
  • 73. RabbitMQ: How does it work ? - 73 -© ANASYS
  • 74. RabbitMQ: How does it work ? - 74 -© ANASYS
  • 75. RabbitMQ: How does it 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 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. - 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
  • 80. 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
  • 81. RabbitMQ : Installation © ANASYS - 81 -
  • 84. Hassan BOUMARSEL Java & Middleware Specialist Contact