I'm wondering is it possible to set the max number of messages in the queue?
Let's say I want to have no more than 100 msgs in queue Foo, is it possible to do?
こうやって幸せになろう!
import pika
QUEUE_SIZE = 5
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
channel = connection.channel()
channel.queue_declare(
queue='ids_queue',
arguments={'x-max-length': QUEUE_SIZE}
)
ここの引数では、キューのキュー オーバーフロー動作も追跡する必要があります。