0

I am trying to get information from the event in openstack using rabbitmq."sudo rabbitmqctl list_queues" from this command am not getting any info count and if i do any operation on devstack like creation instance or volume, the event information will generate and it will come to rabbitmq queues, b ut i am not geeting any thing in the queues.

Listing queues ... 9857-790d4e30b1e0_fanout_662d9b12926e4d389890e0011a3f59c7 0

cert 0

cinder-scheduler 0

cinder-volume 0

compute 0

nova 0

from the following code i am trying to get the event information from nova. #!/usr/bin/env python import pika

connection = pika.BlockingConnection(pika.ConnectionParameters( host='localhost'))

channel = connection.channel()

channel.queue_declare(queue='nova')

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='nova', no_ack=True)

channel.start_consuming()

` Please help me how to get the event from devstack from rabbitmq.

1 Answers1

0

Instead of getting the data from rabbitmqctl, I recommend getting it from the API. See this answer:

https://stackoverflow.com/a/27514729/1173800

Community
  • 1
  • 1
jhilden
  • 12,207
  • 5
  • 53
  • 76
  • Thanks for information, But when i have do any operation like Creation of instance or any operation. I am not getting information to queues in rabbitmq. Its showing zero only for all the queues. its should show the numbers of information with respect to particular queue."sudo rabbitmqctl list_queues" – Shashikant Vasudev Pattar Feb 26 '15 at 07:58