I'm assuming for now that we'll have a specific notifications
consumption API which will use this as an internal implementation
detail. We can make this public again in future if/when we know
what the use case for it is.
These methods are private to the library, so we're prefixing them
with an underscore even though it's a bit unconventional.
See the discussion here:
https://github.com/markmc/oslo-incubator/pull/3
Rather than forcing all users of the server API to construct a
dispatcher and import a specific executor, add a convenience server
class e.g.
server = eventlet.EventletRPCServer(transport, target, endpoints)
Note that openstack.common.messaging.eventlet need be the only public
module which has a dependency on eventlet. We can expose servers,
clients and anything else eventlet specific through this part of the
API.
Move the executors into a sub-package and organize the
code so that only one module imports eventlet.
Rename messaging/rpc/server.py to messaging/rpc/dispatcher.py and
leave only the dispatcher there.
Move the rest of the server code to messaging/server.py where it
can be reused with other dispatchers.
Remove the convenience functions for instantiating servers
to avoid having eventlet imported in the module with the base
class.
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
The methods of the driver and transport should
be public, since they are used outside of those
classes.
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
There are a couple of cases where having the driver instance is a good
thing for the Listener, though, I would like to use the connection
management as motivation here:
Instead of creating a new connection for every Listener it would be
possible to let the driver instance managing the whole connect /
reconnect and session handling process.
In the old implementation, when a reconnect happens, the connection
instance calls every consumer and sets the new connection / session to
them.
See: http://github.com/openstack/oslo-incubator/blob/master/openstack/common/rpc/impl_qpid.py#L368
Listeners can access the config instance through the driver instance.