RabbitMQ Python Pika – Connection handling for multiple messages

www.rabbitmq.com/tutorials/amqp-concepts.html#amqp-connections

TL;DR

AMQP connections are long-lived. The handshake process for an AMQP connection is quite complex and requires at least 7 TCP packets (more if TLS is used). A best practice is to reuse connections and multiplex a connection between threads with channels.

Connection pool details:
A connection pool with a minimum of 10 connections. If more than 10 are needed a new connection can be created. The maximum connections can be of 40 in the pool. A time limit can be set after which the connection can be closed so that the connections can be closed instead of being there forever.

Reference: www.cloudamqp.com/blog/2018-01-19-part4-rabbitmq-13-common-errors.html

Read more here: Source link