Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between AsyncioConnection and SelectConnection adapters in pika

In our current project we are planing to use rabbitMQ and pika to implement queues. can anyone help me with the below queries.

  1. what is the best adapter to use in pika for async operations
  2. can we process messages in a queue parallel
  3. what is the difference between AsyncioConnection and SelectConnection adapters in pika
like image 670
Aswini Avatar asked Oct 21 '25 16:10

Aswini


1 Answers

I am one of Pika's maintainers. There is a mailing list that is the best place for asking questions about Pika.

  1. Use SelectConnection unless you are specifically using asyncio Python features elsewhere.

  2. Yes you can, but you must remember that Pika is not thread safe. There is example code demonstrating how to do work in separate threads then correctly acknowledge the message.

  3. You'll have to do your own homework by looking at the code, but basically AsyncioConnection uses this Python 3 feature.

like image 193
Luke Bakken Avatar answered Oct 23 '25 05:10

Luke Bakken