AMQP Messaging
OKCJUG - January 2014 - Ryan Hoegg
Messaging?
Notify another system
Work queue
Decouple deployments
The Broker

Accepts messages from
publishers
Delivers messages to
consumers
Queue

X
Queue
X
Publish / Subscribe

Consumers can listen
when they want
Many consumers could
get the message
Open standard for messaging middleware

Defines a networking protocol
Defines semantics of broker services
The Message

Payload (byte[])
Attributes (key/value pairs)
Queue
Queue
Queue
name
attributes
durable
exclusive
auto-delete
arguments
Exchange
Exchange
name
type
attributes
durable
auto-delete
arguments
Binding

Rule used by exchange to route messages to a
queue
Has optional routing key
Fanout Exchange
Simple pub/sub
Message routed to every queue bound to the
exchange
Routing key is ignored
Direct Exchange

Simple point-to-point
Message routed to queue if routing key matches
binding exactly
Topic Exchange
Message routed to queue based on routing-key
match
Use dots within queue names and wildcards in
routing key...
Setting things up

Programmable: clients
declare everything
Most servers come with
management tools too,
though
Version Confusion
AMQP 0.9.1 widely implemented
AMQP 1.0 approved in October
They are very different
Servers
RabbitMQ: http://www.rabbitmq.com/
OpenAMQ: http://www.openamq.org
Apache Qpid: http://qpid.apache.org/
AMQP Alternatives
JMS (ActiveMQ is pretty good)
ZeroMQ
Amazon SQS
IronMQ
pubsubhubbub (RESTful)
redis
Installation
Provides installer for Windows, OSX, several
linux distributions, solaris
Uses erlang runtime
Management Plugin

$ rabbitmq-plugins enable
rabbitmq_management
Distributed
Brokers
Clustering
HA Queues
Federation
Shovel
AMQP and RabbitMQ (OKCJUG, January 2014)
AMQP and RabbitMQ (OKCJUG, January 2014)
Upcoming SlideShare
Loading in …5
×

AMQP and RabbitMQ (OKCJUG, January 2014)

1,479 views

Published on

Introduction to AMQP and RabbitMQ

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,479
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
59
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

AMQP and RabbitMQ (OKCJUG, January 2014)

  1. 1. AMQP Messaging OKCJUG - January 2014 - Ryan Hoegg
  2. 2. Messaging? Notify another system Work queue Decouple deployments
  3. 3. The Broker Accepts messages from publishers Delivers messages to consumers
  4. 4. Queue X
  5. 5. Queue X
  6. 6. Publish / Subscribe Consumers can listen when they want Many consumers could get the message
  7. 7. Open standard for messaging middleware Defines a networking protocol Defines semantics of broker services
  8. 8. The Message Payload (byte[]) Attributes (key/value pairs)
  9. 9. Queue
  10. 10. Queue
  11. 11. Queue name attributes durable exclusive auto-delete arguments
  12. 12. Exchange
  13. 13. Exchange name type attributes durable auto-delete arguments
  14. 14. Binding Rule used by exchange to route messages to a queue Has optional routing key
  15. 15. Fanout Exchange Simple pub/sub Message routed to every queue bound to the exchange Routing key is ignored
  16. 16. Direct Exchange Simple point-to-point Message routed to queue if routing key matches binding exactly
  17. 17. Topic Exchange Message routed to queue based on routing-key match Use dots within queue names and wildcards in routing keys
  18. 18. Setting things up Programmable: clients declare everything Most servers come with management tools too, though
  19. 19. Version Confusion AMQP 0.9.1 widely implemented AMQP 1.0 approved in October They are very different
  20. 20. Servers RabbitMQ: http://www.rabbitmq.com/ OpenAMQ: http://www.openamq.org Apache Qpid: http://qpid.apache.org/
  21. 21. AMQP Alternatives JMS (ActiveMQ is pretty good) ZeroMQ Amazon SQS IronMQ pubsubhubbub (RESTful) redis
  22. 22. Installation Provides installer for Windows, OSX, several linux distributions, solaris Uses erlang runtime
  23. 23. Management Plugin $ rabbitmq-plugins enable rabbitmq_management
  24. 24. Distributed Brokers Clustering HA Queues Federation Shovel

×