[rabbitmq-discuss] Beginner Issue with Rabbit MQ

Goel, Vaibhav vaibhav.goel at amec.com
Tue Jun 5 17:43:27 BST 2012



Hi all

I am trying to configure RabbitMQ on Oracle Linux 64-bit (latest version 6.2)

I could not find RPMs for RabbitMQ and Erlang so I compiled everything from scratch and got RabbitMQ up and running. Below is the output of RabbitMQ on my VM.

AMQP 0-9-1 / 0-9 / 0-8
Copyright (C) 2007-2012 VMware, Inc.
Licensed under the MPL. See http://www.rabbitmq.com/

node : rabbit at flanker
app descriptor : /usr/local/rabbitmq/sbin/../ebin/rabbit.app
home dir : /root
config file(s) : (none)
cookie hash : ijr/uCKNx6qvaM2IVt/Mmw==
log : /var/log/rabbitmq/rabbit at flanker.log
sasl log : /var/log/rabbitmq/rabbit at flanker-sasl.log
database dir : /var/lib/rabbitmq/mnesia/rabbit at flanker
erlang version : 5.9.1


I am trying to do the Python RabbitMQ tutorial and just cannot seem to get it to work. Below is the code in my send.py and receive.py

send.py
--------

#!/usr/bin/env python
import pika

connection = pika.BlockingConnection(pika.ConnectionParameters( host='flanker'))
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()



receive.py
-----------
#!/usr/bin/env python
import pika

connection = pika.BlockingConnection(pika.ConnectionParameters(
host='flanker'))
channel = connection.channel()

channel.queue_declare(queue='hello')

print '[*] Waiting for messages. To exit press CTRL+C'

def callback(ch, method, properties, body):
print " [x] Received %r" % (body,)

channel.basic_consume(callback,
queue='hello',
no_ack=True)

channel.start_consuming()



When I do send.py, I get the following in /var/log/rabbitmq/rabbit at flanker.log

=INFO REPORT==== 5-Jun-2012::10:01:05 ===
accepting AMQP connection <0.450.0> (127.0.0.1:39162 -> 127.0.0.1:5672)


However no messages are showing up in the recieve.py window and also

[root at flanker rabbitmq]# /usr/local/sbin/rabbitmqctl list_queues
Listing queues ...
hello 0
...done.


Always shows 0.

Any ideas? I am a rabbitmq newbie and not sure what I am doing wrong. Obviously missing a config step or a permission somewhere....

Any help is highly appreciated.

Thanks!

________________________________
The information contained in this e-mail is intended only for the individual or entity to whom it is addressed.
Its contents (including any attachments) may contain confidential and/or privileged information.
If you are not an intended recipient you must not use, disclose, disseminate, copy or print its contents.
If you receive this e-mail in error, please notify the sender by reply e-mail and delete and destroy the message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120605/5b977059/attachment.htm>


More information about the rabbitmq-discuss mailing list