[openstack-dev] [Quantum][Common] Private rpc methods / declare_topic_consumer

Eric Windisch eric at cloudscaling.com
Wed Sep 5 20:32:25 UTC 2012

> Yep, at a glance, it looks like declare_topic_consumer() is an
> implementation detail of create_consumer() and Quantum should be using
> create_consumer(). Good catch.

Yes, generally the API assumes that projects use using create_consumer, but I suppose the counter-argument would be that for notifications, this doesn't really apply.  Using create_consumer assumes messages are of a certain format, containing a method call, this function is passed a class that contains corresponding methods to these requests.  Even if the Quantum project built a class, fed it to a dispatcher, and passed that into create_consumer, there would be no method call.  The callback would never be executed.

Basically, there is no agreed API or consumer pattern for notifications.  Right now, there might be no viable alternative to using declare_topic_consumer().

Perhaps what we most urgently is a standard method to consume notifications, allowing the message format and handling to be specific to the RPC drivers.

Eric Windisch

More information about the OpenStack-dev mailing list