Nova/Quantum Notifications in RabbitMQ

asked 2013-06-16 08:30:31 -0500

tzafrir gravatar image

updated 2013-06-16 14:07:42 -0500

Hi all,

I'm trying to catch nova/quantum modules (and others later) notifications.

What I would like to catch are events that indicate changes in instances and network:

  • Instance create/delete/suspend
  • IP assigning/deleting
  • Port add/delete
  • Security Groups changes

The problem is that I don't catch any notification messages.

I noticed that Nova doesn't send notifications.# to the nova exchange but to the default AMQP exchange.

As an example, when I suspend/resume an instance, the only messages I get are requests from Nova and Quantum. I don't see any messages with event_type.

I found the following documents: and of course -

I am using the RabbitMQ API to query the exchanges/queues existing on the controller and bind a queue to each exchange.

I am "listening" to the following exchanges (topic/fanout): nova, quantum, openstack, compute, q-agent, scheduler, conductor

and I filter out the following methods: service_update, report_state, update_service_capabilities.

  • Am I doing something wrong? (probably yes)
  • Where are the notifications being sent to?
  • For what exchanges should I bind to get the notifications I need?
  • I didn't quite understand what is the oslo.message...

Thanks in advance! Tzafrir

can't attach output - no karma!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2013-06-20 05:54:52 -0500

darragh-oreilly gravatar image

I'm not sure this will help, but I get messages from both quantum and nova with this:

from kombu import Connection, Exchange, Queue
from pprint import pprint

nova_x = Exchange('nova', type='topic', durable=False)
info_q = Queue('', exchange=nova_x, durable=False, 

def process_msg(body, message):
    print '='*80

with Connection('amqp://guest:guest@') as conn:
    with conn.Consumer(info_q, callbacks=[process_msg]):
        while True:
            except KeyboardInterrupt:


notification_driver = quantum.openstack.common.notifier.rpc_notifier
#notification_driver = quantum.openstack.common.notifier.log_notifier
default_notification_level = INFO
notification_topics = notifications


notification_driver = nova.openstack.common.notifier.rpc_notifier
#notification_driver = nova.openstack.common.notifier.log_notifier
default_notification_level = INFO
notification_topics = notifications
notify_on_state_change = vm_and_task_state
notify_api_faults = true
edit flag offensive delete link more


Thanks for the answer. This is exactly what i'm doing (just using the Java API). Perhaps I should mention that i'm using the latest devstack as an environment... I guess it's not an official OpenStack build. I will try with Grizzly.

tzafrir gravatar imagetzafrir ( 2013-06-21 01:32:26 -0500 )edit

Yeah, that might be your problem - I used Grizzly. Look for blueprints, bugs and git-blame around this code to see what's changing. I found the RabbitMQ web interface very useful

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-06-21 03:09:45 -0500 )edit

I am using it. really useful in understanding how everything connects. Should there be any difference in the configuration when setting the nova.conf on the compute node?

tzafrir gravatar imagetzafrir ( 2013-06-21 03:15:58 -0500 )edit

I haven't tried it on nova-compute. Maybe you could 'grep -r' the whole nova source tree to find all notifier calls. The rabbit_notifier is deprecated

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-06-21 03:26:01 -0500 )edit

Hi tzaffir,

Were you able to receive notifications in your java code ? How does the notification subscription setup look like ?

Murali G D gravatar imageMurali G D ( 2014-03-19 22:38:31 -0500 )edit

answered 2014-10-01 10:01:49 -0500

Goblja gravatar image

hello everybody... I wanted to try this code to listen from heat. But i dont get messages... if i change from to engine queue then i recieve messages, but i need notifications... Also tried to do this with nova. Bad luck dont get no notification messages I use devstack with icehouse... mybe i am doing something wrong :) how could i check are there notifications or not?

edit flag offensive delete link more


Try to use the special routing key #

Tosugueur gravatar imageTosugueur ( 2015-09-28 05:20:26 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2013-06-16 08:30:31 -0500

Seen: 3,093 times

Last updated: Oct 01 '14