SlideShare a Scribd company logo
1 of 13
Download to read offline
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 from Queue
• Messages from Exchange are routed to Queue
based on condition specified by Binding
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
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
• http://sdiehl.github.io/gevent-tutorial/

More Related Content

What's hot

Building Kafka-powered Activity Stream
Building Kafka-powered Activity StreamBuilding Kafka-powered Activity Stream
Building Kafka-powered Activity Stream
Oleksiy Holubyev
 

What's hot (20)

Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQ
 
3.2 Streaming and Messaging
3.2 Streaming and Messaging3.2 Streaming and Messaging
3.2 Streaming and Messaging
 
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
 
Using RabbitMQ and Netty library to implement RPC protocol
Using RabbitMQ and Netty library to implement RPC protocolUsing RabbitMQ and Netty library to implement RPC protocol
Using RabbitMQ and Netty library to implement RPC protocol
 
[Draft] Fast Prototyping with DPDK and eBPF in Containernet
[Draft] Fast Prototyping with DPDK and eBPF in Containernet[Draft] Fast Prototyping with DPDK and eBPF in Containernet
[Draft] Fast Prototyping with DPDK and eBPF in Containernet
 
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
 
Let the alpakka pull your stream
Let the alpakka pull your streamLet the alpakka pull your stream
Let the alpakka pull your stream
 
Building Kafka-powered Activity Stream
Building Kafka-powered Activity StreamBuilding Kafka-powered Activity Stream
Building Kafka-powered Activity Stream
 
How fast is it?
How fast is it?How fast is it?
How fast is it?
 
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
 
WebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST MicroserviceWebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST Microservice
 
Deep dive into Apache Kafka consumption
Deep dive into Apache Kafka consumptionDeep dive into Apache Kafka consumption
Deep dive into Apache Kafka consumption
 
Load Balancing with Apache
Load Balancing with ApacheLoad Balancing with Apache
Load Balancing with Apache
 
Multi-language/multi-OS communication using RabbitMQ
Multi-language/multi-OS communication using RabbitMQMulti-language/multi-OS communication using RabbitMQ
Multi-language/multi-OS communication using RabbitMQ
 
Apache Kafka Demo
Apache Kafka DemoApache Kafka Demo
Apache Kafka Demo
 
Apache Kafka – (Pattern and) Anti-Pattern
Apache Kafka – (Pattern and) Anti-PatternApache Kafka – (Pattern and) Anti-Pattern
Apache Kafka – (Pattern and) Anti-Pattern
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with Messaging
 
Pulsar - flexible pub-sub for internet scale
Pulsar - flexible pub-sub for internet scalePulsar - flexible pub-sub for internet scale
Pulsar - flexible pub-sub for internet scale
 
Introducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIntroducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.com
 
Managing ejabberd Platforms with Docker - ejabberd Workshop #1
Managing ejabberd Platforms with Docker - ejabberd Workshop #1Managing ejabberd Platforms with Docker - ejabberd Workshop #1
Managing ejabberd Platforms with Docker - ejabberd Workshop #1
 

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

Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
Ortus Solutions, Corp
 
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
 
RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009
Paolo Negri
 

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

EKON27-FrameworksTuning.pdf
EKON27-FrameworksTuning.pdfEKON27-FrameworksTuning.pdf
EKON27-FrameworksTuning.pdf
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
 
Follow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHPFollow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHP
 
Ruby Microservices with RabbitMQ
Ruby Microservices with RabbitMQRuby Microservices with RabbitMQ
Ruby Microservices with RabbitMQ
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
 
High Performance Systems in Go - GopherCon 2014
High Performance Systems in Go - GopherCon 2014High Performance Systems in Go - GopherCon 2014
High Performance Systems in Go - GopherCon 2014
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
Picking a message queue
Picking a  message queuePicking a  message queue
Picking a message queue
 
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
 
.NET Conf 2022 - Networking in .NET 7
.NET Conf 2022 - Networking in .NET 7.NET Conf 2022 - Networking in .NET 7
.NET Conf 2022 - Networking in .NET 7
 
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
 
RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009
 
Http2 Security Perspective
Http2 Security PerspectiveHttp2 Security Perspective
Http2 Security Perspective
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
Enterprise messaging
Enterprise messagingEnterprise messaging
Enterprise messaging
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusion
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message Broker
 
Flexible Indexing in Lucene 4.0
Flexible Indexing in Lucene 4.0Flexible Indexing in Lucene 4.0
Flexible Indexing in Lucene 4.0
 
Fluentd at HKOScon
Fluentd at HKOSconFluentd at HKOScon
Fluentd at HKOScon
 

More from IT-Доминанта

Алексей Федоров: Количественные исследования в HR
Алексей Федоров: Количественные исследования в HRАлексей Федоров: Количественные исследования в HR
Алексей Федоров: Количественные исследования в HR
IT-Доминанта
 

More from IT-Доминанта (20)

Алексей Федоров: Количественные исследования в HR
Алексей Федоров: Количественные исследования в HRАлексей Федоров: Количественные исследования в HR
Алексей Федоров: Количественные исследования в HR
 
Рекрутеры не волшебники или Почему клиенты тоже плачут?
Рекрутеры не волшебники или Почему клиенты тоже плачут?Рекрутеры не волшебники или Почему клиенты тоже плачут?
Рекрутеры не волшебники или Почему клиенты тоже плачут?
 
Soft skills matrix for HR manager
Soft skills matrix for HR managerSoft skills matrix for HR manager
Soft skills matrix for HR manager
 
Конкуренция городов среди ИТ-специалистов
Конкуренция городов среди ИТ-специалистовКонкуренция городов среди ИТ-специалистов
Конкуренция городов среди ИТ-специалистов
 
Волшебная формула найма
Волшебная формула наймаВолшебная формула найма
Волшебная формула найма
 
Рекрутинг и коммьюнити билдинг за МКАДом: миссия выполнима
Рекрутинг и коммьюнити билдинг за МКАДом: миссия выполнимаРекрутинг и коммьюнити билдинг за МКАДом: миссия выполнима
Рекрутинг и коммьюнити билдинг за МКАДом: миссия выполнима
 
Как продать вакансию техническому специалисту?
Как продать вакансию техническому специалисту?Как продать вакансию техническому специалисту?
Как продать вакансию техническому специалисту?
 
Для спикера Piter Py #3
Для спикера Piter Py #3Для спикера Piter Py #3
Для спикера Piter Py #3
 
IT HR Meetup 24 (Faina Lerner)
IT HR Meetup 24 (Faina Lerner)IT HR Meetup 24 (Faina Lerner)
IT HR Meetup 24 (Faina Lerner)
 
Дмитрий Кончаленков "Особенности маркетинга IT продуктов в социальных сетях"
Дмитрий Кончаленков "Особенности маркетинга IT продуктов в социальных сетях"Дмитрий Кончаленков "Особенности маркетинга IT продуктов в социальных сетях"
Дмитрий Кончаленков "Особенности маркетинга IT продуктов в социальных сетях"
 
Андрей Маркин "Основы маркетинга (продвижения) IT продуктов в поисковых и мед...
Андрей Маркин "Основы маркетинга (продвижения) IT продуктов в поисковых и мед...Андрей Маркин "Основы маркетинга (продвижения) IT продуктов в поисковых и мед...
Андрей Маркин "Основы маркетинга (продвижения) IT продуктов в поисковых и мед...
 
6 самых неприличных поз HR-брендинга и стоит ли им заниматься вообще
6 самых неприличных поз HR-брендинга и стоит ли им заниматься вообще6 самых неприличных поз HR-брендинга и стоит ли им заниматься вообще
6 самых неприличных поз HR-брендинга и стоит ли им заниматься вообще
 
Цифровой лайфхак, или как посчитать счастье сотрудников: сбор, анализ и предс...
Цифровой лайфхак, или как посчитать счастье сотрудников: сбор, анализ и предс...Цифровой лайфхак, или как посчитать счастье сотрудников: сбор, анализ и предс...
Цифровой лайфхак, или как посчитать счастье сотрудников: сбор, анализ и предс...
 
Повышаем эффективность и прозрачность HR, сокращаем расходы
Повышаем эффективность и прозрачность HR, сокращаем расходыПовышаем эффективность и прозрачность HR, сокращаем расходы
Повышаем эффективность и прозрачность HR, сокращаем расходы
 
Премирование для IT – фикция или работающий инструмент?
Премирование для IT – фикция или работающий инструмент?Премирование для IT – фикция или работающий инструмент?
Премирование для IT – фикция или работающий инструмент?
 
Простые непростые истины бюджетирования или сколько стоит управление персоналом?
Простые непростые истины бюджетирования или сколько стоит управление персоналом?Простые непростые истины бюджетирования или сколько стоит управление персоналом?
Простые непростые истины бюджетирования или сколько стоит управление персоналом?
 
Повышают ли ретроспективы проектов результативность команд? (Дмитрий Лазареd)
Повышают ли ретроспективы проектов результативность команд? (Дмитрий Лазареd)Повышают ли ретроспективы проектов результативность команд? (Дмитрий Лазареd)
Повышают ли ретроспективы проектов результативность команд? (Дмитрий Лазареd)
 
О геймификации серьезно: опыт Veeam (от проблемы до внедрения)
О геймификации серьезно: опыт Veeam (от проблемы до внедрения)О геймификации серьезно: опыт Veeam (от проблемы до внедрения)
О геймификации серьезно: опыт Veeam (от проблемы до внедрения)
 
дарья кирпо для найти ответ - публикация
дарья кирпо   для найти ответ  - публикациядарья кирпо   для найти ответ  - публикация
дарья кирпо для найти ответ - публикация
 
HR брендинг: позиционирование компании на рынке труда (часть 1)
HR брендинг: позиционирование компании на рынке труда (часть 1)HR брендинг: позиционирование компании на рынке труда (часть 1)
HR брендинг: позиционирование компании на рынке труда (часть 1)
 

Recently uploaded

Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Recently uploaded (20)

Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

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