Async AMQP
kombu + gevent
https://github.com/renskiy/async_amqp
Table of contents
• requirements
• AMQP
• gevent + kombu
• solution
• useful links and questions
Queues are useful for
• process synchronization
• deferred computations
• slow I/O
Somewhere in the code
Requirements
• Python 2.x (2.5 or higher)
• gevent
• kombu
Advanced Message Queuing
Protocol
• Broker
• Message
• All messages are published into Exchange
• Client consumes messages...
Exchange types
• direct - exact match of message’s Routing Key and
binding’s one
• topic - basic routing based on wildcard...
gevent + kombu
Publisher
Sync Consumer
Async Consumer
Semaphore Consumer
Useful links
• https://github.com/renskiy/async_amqp
• http://mutlix.blogspot.ru/2007/09/amqp-in-10-
mins-part0.html
• htt...
Upcoming SlideShare
Loading in …5
×

Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)

1,335 views

Published on

Хабибиев Ринат - Senior Python Developer / Россия, Москва

Тема доклада - показать как легко и просто начать использовать очереди сообщений в Python в асинхронных воркерах, использующих gevent.

http://www.it-sobytie.ru/events/2040

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

No Downloads
Views
Total views
1,335
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)

  1. 1. Async AMQP kombu + gevent https://github.com/renskiy/async_amqp
  2. 2. Table of contents • requirements • AMQP • gevent + kombu • solution • useful links and questions
  3. 3. Queues are useful for • process synchronization • deferred computations • slow I/O
  4. 4. Somewhere in the code
  5. 5. Requirements • Python 2.x (2.5 or higher) • gevent • kombu
  6. 6. Advanced Message Queuing Protocol • Broker • Message • All messages are published into Exchange • Client consumes messages from Queue • Messages from Exchange are routed to Queue based on condition specified by Binding
  7. 7. Exchange types • direct - exact match of message’s Routing Key and binding’s one • topic - basic routing based on wildcard matching of Routing Key treated as zero or more words separated by «.» («*» - single word, «#» - zero or more words) • fanout - simple broadcast • headers - more complicated routing based on custom headers matching
  8. 8. gevent + kombu
  9. 9. Publisher
  10. 10. Sync Consumer
  11. 11. Async Consumer
  12. 12. Semaphore Consumer
  13. 13. Useful links • https://github.com/renskiy/async_amqp • http://mutlix.blogspot.ru/2007/09/amqp-in-10- mins-part0.html • http://sdiehl.github.io/gevent-tutorial/

×