RabbitMQ Messaging

6,624 views

Published on

RabbitMQ Introduction presentation delivered at the Melbourne Ruby User Group, 27/8/2009

Published in: Technology
0 Comments
28 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,624
On SlideShare
0
From Embeds
0
Number of Embeds
678
Actions
Shares
0
Downloads
0
Comments
0
Likes
28
Embeds 0
No embeds

No notes for slide

RabbitMQ Messaging

  1. 1. Messaging RabbitMQ
  2. 2. Marcus Crafter Red Artisan & CLEAR Interactive (@crafterm)
  3. 3. Daniel Neighman CLEAR Interactive (@hassox)
  4. 4. Background
  5. 5. http://www.flickr.com/photos/james_c_mattison/2267135704/ During Development
  6. 6. 1st Release
  7. 7. Complexity
  8. 8. Request/Response Time
  9. 9. Background Activity
  10. 10. Monolithic Extraction
  11. 11. Memory & Garbage Collection
  12. 12. External Communication
  13. 13. Messaging
  14. 14. Background processing BJ, DJ, BackgroundRB, Airbrush, Workling/Starling, DB Messaging Stomp, XMPP, ActiveMQ, Amazon SQS, MQ Series, M$
  15. 15. Goldman Sachs
  16. 16. AMQP Advanced Messaging Queueing Protocol
  17. 17. AMQP Working Group Barclays Bank IONA Technologies Cisco Systems JPMorgan Chase Bank Credit Suisse Microsoft Corporation Deutsche Börse Novell Envoy Technologies Red Hat Inc Goldman Sachs Solace Inc iMatix Corporation Tervela Inc ... and more
  18. 18. Reliable, Transaction, Acknowledgement, Routed, Pub Sub, Independent
  19. 19. Protocol Specification
  20. 20. AMQP Implementations Apache Qpid Red Hat Enterprise MRG ØMQ Zyre OpenAMQ and many more, plus bindings to existing products
  21. 21. Rabbit MQ http://www.rabbitmq.com
  22. 22. Open Source
  23. 23. Erlang OTP
  24. 24. Distributed
  25. 25. Shiny
  26. 26. Architecture AMQP & Rabbit MQ
  27. 27. RabbitMQ Producer Exchange Consumer Queue Queue Queue
  28. 28. Queues Acts as a message buffer between producer & consumer
  29. 29. Exchange Determines how messages are routed to queues
  30. 30. Producer Publishes messages to the exchange
  31. 31. Consumer Receives message from the queue
  32. 32. Message Naturally :)
  33. 33. AMQP & Ruby Libraries, Gems, etc
  34. 34. tmm1-amqp Event Machine Based & Asynchronous
  35. 35. carrot & bunny Synchronous
  36. 36. Direct Exchange Routing Based on “key” that matches exactly
  37. 37. Direct Exchange Routing Based on “key” that matches exactly Direct
  38. 38. Direct Exchange Routing Based on “key” that matches exactly Direct Homer Bindings: “Beer”“Food” ,
  39. 39. Direct Exchange Routing Based on “key” that matches exactly Direct Homer Marge Bindings: Bindings: “Beer”“Food” , “Food”
  40. 40. Direct Exchange Routing Based on “key” that matches exactly Direct Key = “Beer” Homer Marge Bindings: Bindings: “Beer”“Food” , “Food”
  41. 41. Direct Exchange Routing Based on “key” that matches exactly Direct Homer Marge Bindings: Bindings: “Beer”“Food” , “Food”
  42. 42. Direct Exchange Routing Based on “key” that matches exactly Direct Key = “Food” Homer Marge Bindings: Bindings: “Beer”“Food” , “Food”
  43. 43. Direct Exchange Routing Based on “key” that matches exactly Direct Homer Marge Bindings: Bindings: Key =,“Food” Key = “Food” “Beer”“Food” “Food”
  44. 44. Direct Exchange Demo - Rails
  45. 45. Fanout Exchange Copies to all bound queues
  46. 46. Fanout Exchange Copies to all bound queues Fanout Silo Silo Silo
  47. 47. Fanout Exchange Copies to all bound queues Launch All Fanout Nukes Silo Silo Silo
  48. 48. Fanout Exchange Copies to all bound queues Fanout Launch All Launch All Launch All Silo Silo Silo Nukes Nukes Nukes
  49. 49. Fanout Exchange Demo - Desktop
  50. 50. Topic Exchange Route By Key, with Key Globbing
  51. 51. Topic Exchange Route By Key, with Key Globbing Topic Homer Marge Consumers Bindings: Bindings: Bindings: “*.Beer” “Consume.Food” “Consume.#”
  52. 52. Topic Exchange Route By Key, with Key Globbing Toast Topic “Consume.Food” Homer Marge Consumers Bindings: Bindings: Bindings: “*.Beer” “Consume.Food” “Consume.#”
  53. 53. Topic Exchange Route By Key, with Key Globbing Topic Homer Marge Consumers Bindings: Bindings: Bindings: “*.Beer” “Consume.Food” “Consume.#”
  54. 54. Topic Exchange Route By Key, with Key Globbing Some Brand “Consume.Beer” Topic Homer Marge Consumers Bindings: Bindings: Bindings: “*.Beer” “Consume.Food” “Consume.#”
  55. 55. Topic Exchange Route By Key, with Key Globbing Topic Homer Marge Consumers Bindings: Bindings: Bindings: “*.Beer” “Consume.Food” “Consume.#”
  56. 56. Header Exchange Route on Meta Data
  57. 57. Header Exchange Route on Meta Data Header Homer Marge Watch Dog Bindings: Bindings: Bindings: “type” = “Beer” “type” = “Food”, “rating” = “fatty” “rating” = “fatty” “rating” = “health”
  58. 58. Header Exchange Route on Meta Data Header Homer Marge Watch Dog Bindings: Bindings: Bindings: “type” = “Beer” “type” = “Food”, “rating” = “fatty” “rating” = “fatty” “rating” = “health”
  59. 59. Header Exchange Route on Meta Data Header Homer Marge Watch Dog Bindings: Bindings: Bindings: “type” = “Beer” “type” = “Food”, “rating” = “fatty” “rating” = “fatty” “rating” = “health”
  60. 60. Header Exchange Route on Meta Data Header Homer Marge Watch Dog Bindings: Bindings: Bindings: “type” = “Beer” “type” = “Food”, “rating” = “fatty” “rating” = “fatty” “rating” = “health”
  61. 61. More Information? http://amqp.org http://www.rabbitmq.com Google Video RabbitMQ http://github.com/tmm1/amqp http://github.com/celldee/bunny
  62. 62. Any Questions?

×