KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How do you ensure that messages get delivered with Pika ? By default it will not provide you with an error if the message was not delivered succesfully. In this example several messages can be sent before pika acknowledges that the connection was down. import pika connection = pika.BlockingConnection(pika.ConnectionParameters( host='localhost')) channel = connection.channel() channel.queue_declare(queue='hello') for index in xrange(10): channel.basic_publish(exchange='', routing_key='hello', body='Hello World #%s!' % index) print('Total Messages Sent: %s' % x) connection.close()
Tags (comma-separated)
Save Edits
Cancel