Hi All,
I am getting a very slow publish rate (only 17 messages/sec) when using delivery confirmation on Pika. Without delivery confirmation (just commenting out channel.confirm_delivery()), the publish rate is 16K messages/sec. I am using a single publisher and RabbitMQ v3.5.5. This is the example code I am using to publish the messages:
import pika
connection = pika.BlockingConnection()
channel = connection.channel()
channel.queue_declare(queue='myqueue', durable=True)
channel.confirm_delivery()
message = ' '.join(sys.argv[1:]) or "Hello World!"
for i in range(1, 10000000):
channel.basic_publish(exchange='myexchange',
routing_key='myqueue',
body=message,
properties=pika.BasicProperties(
delivery_mode = 2,),
mandatory=True)
connection.close()
Am I doing something wrong? Can I achieve higher publish rates using Pika?
Thanks!