[rabbitmq-discuss] Hello World Example
Gary Richards
richardsbeats at gmail.com
Mon Feb 21 01:24:54 GMT 2011
When I try to use the Hello World example for Python I get the
following error:
TypeError: channel() takes at least 2 arguments (1 given)
Does anyone know what is wrong?
I use the following code:
#!/usr/bin/env python
import pika
connection = pika.AsyncoreConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()
channel.queue_declare(queue='hello')
channel.basic_publish(exchange='',
routing_key='hello',
body='Hello World!')
print " [x] Sent 'Hello World!'"
connection.close()
More information about the rabbitmq-discuss
mailing list