Message queuing connects systems and components loosely by allowing them to exchange data and information asynchronously without being directly connected or aware of each other. It is ideal for cloud applications as it provides loose coupling between systems, making individual systems less likely to suffer outages when another system changes or has issues. The document discusses the history and benefits of message queuing including AMQP, which provides an open standard to enable interoperability between messaging systems.
2. Agenda
A Real Application ! 20 min
Nibbles and Hands–On ! 60 min
Introduction to AMQP ! 20 min
Why Message Queuing? ! 25 min
Classic Architecture ! 10 min
3. History of Message Queuing
Manual Telegraphy Machine Assisted Telegraphy
1920s1911 - 192019th Century 1900s
Telegrams sent using
“Store and Forward”
1900
1930s
4. History of Message Queuing
Telcos UseElectronic Telegraphy
1950s1940s 1960s
IBM System/360 with
BTAM & QTAM
Message Switching
1964
First Electronic Mail
Solutions
1965
Banking Users
1970s
IBM TCAM which is
the first true solution
Retired 1990!
1971
5. History of Message Queuing
l
FMCG & Utilities
1990s
MQSeries
phereMQ)
92
Corporates Large Websites YOU
Noughties Today
Sun Release Java JMS,
Reinvigorating
Enterprise Messaging
2001
AMQP Working
Group Formed by
Investment Banks
2006
Cloud Enables and
Drives StormMQ
Adoption
2009
11. Why Use it: Loose Coupling
Billing
Catalogue
Shipping
S-a-a-S Inventory
How do we connect them, without one outage or system
change taking everything down like a pack of cards?
12. Why Use it: Loose Coupling
Billing
Catalogue
Shipping
S-a-a-S Inventory
How do we connect them, without one outage or system
change taking everything down like a pack of cards?
Message Queuing lets Systems and Components exchange
data, events, commands and actions with one another
with no explicit knowledge or need for them to be online
21. However, AMQP fixes this
A common wire-level binary
format and protocol
An explicit definition of a
server (aka broker)’s
semantics
Open Means
Interoperable
22. That is good …
“AMQP will be to Messaging what HTTP was to theWeb”
MRG
Clients run on any Platform Vendors are Interoperable
23. That is good …
“AMQP will be to Messaging what HTTP was to theWeb”
MRG
Clients run on any Platform Vendors are Interoperable
64K
26. EddieVelez
Quick Recap
✓
The fifth male member
of the A-Team, Frankie,
was played by
Question
Message Queuing connects systems and
components. Is it ideal for the cloud?
Does Loose-Coupling make individual
systems more likely to suffer outages?
Yes No
AMQP is Open.
This makes it suitable for programming
in C and Javascript?
!
✓
27. Agenda
Introduction to AMQP ! 20 min
Why Message Queuing? ! 25 min
Classic Architecture ! 10 min
A Real Application ! 20 min
Pizza and Hands–On ! 60 min
35. Agenda
Introduction to AMQP ! 20 min
Why Message Queuing? ! 25 min
Classic Architecture ! 10 min
A Real Application ! 20 min
Nibbles and Hands–On ! 60 min
36. Messaging: Which Jargon?
EMail
(SMTP, POP3, IMAP)
VoIP
(VoiceMail, XMPP)
Texting
(SMS)
Instant Messaging
(ICQ, MSN, Jabber)
Twitter
Enterprise Service Bus
(ESB)
Dynamic OO
Languages
(eg Ruby)
Message Queuing
(MQ)
Message Queuing
(MQ)
What do we
mean by
Messaging?
38. Essential Terms
*Strictly speaking
a receiver polls for messages
a consumer has messages pushed
≣ ≊Send Publish Enqueue
≣ ≊ DequeueConsume*Receive
39. Connection
AMQP Client AMQP ServerTCP / IP Network
Connection
Virtual Host
Connections and Channels
TLS
“Shielding”
Channels
Each Channel is Independent:
Effectively, aVirtual Connection
40. Basic AMQP
Basic AMQP: Connections
Open a Connection to aVirtual Host
Open a Channel
Send a Message
Receive a Message
Close Channel
Close Connection
You only need one channel!
"
#
$
%
&
'
41. Exchanges Route Messages
Exchanges route Messages to Message Queues
You send messages to an exchange, not a message queue
Exchange
MQ
A
MQ
B
42. How do Exchanges Route?
Exchange
MQ
A
The Exchange finds a Binding
matching the Routing Key
#
A Binding connects a Routing Key
to one or more Message Queues
$
Every sent message has a
Routing Key
"
The Exchange delivers the
Message to the Message Queue
%
A message queue can be
bound more than once to
one or more exchanges
(
“string”
43. Types of Exchange
More rarely used exchange types include amq.headers and extensions
Message Queue Name
direct
Like a ‘Map’:All MQs
bound with the
routing key receive
copies of the message
“” (blank)
amq.direct
fanout
Empty String
All MQs bound to the
Exchange receive
copies of the message
amq.fanout
topic
Dotted
Bindings use
globbing expressions
(wildcards) to route
messages to MQs
amq.topic
A message queue can be bound more than once to an exchange;
A message queue can be bound to more than one exchange
But a message queue will only receive a message sent once
Routing Key
Routing
Behaviour
Default
Definitions
Point – to – Point One – to – Many Publish – SubscribeTypical Use
44. And there is more!
Transactions
More Message
Properties
Custom Message
Properties
Immediate Delivery
Additional Exchange
Types
Auto Deletion
Fine-Grained User
Permissions
Queue
Purging
QoS
45. Agenda
Introduction to AMQP ! 20 min
Why Message Queuing? ! 25 min
Classic Architecture ! 10 min
A Real Application ! 20 min
Nibbles and Hands–On ! 60 min