Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import pika
- import uuid
- connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
- channel = connection.channel()
- count = 0
- while (count < 500000):
- headers = {'message-distribution-hash': str(uuid.uuid4())}
- channel.basic_publish(exchange='logging.topic',routing_key='error',body='Test Message',properties=pika.BasicProperties(headers=headers))
- count = count + 1
- print " [x] Sent 'Test Message' Number " + str(count)
- connection.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement