[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/StrGlee/rabbitmqexample/master/webSocketPython/sendtest.py [Back]  [Original]

#!/usr/bin/env python

import pika
import logging
logging.basicConfig()

connection = pika.BlockingConnection()
print 'Connected:localhost'
channel = connection.channel()
channel.queue_declare(queue="my_queue")
channel.basic_publish(exchange='',
                      routing_key='my_queue',
                      body='Test Message')
connection.close()

Web Proxy Viewer  |  New URL  |  Original Page