[Openstack] oslo.messaging eventlet executor

Tong Li litong01 at us.ibm.com
Mon Apr 21 13:51:11 UTC 2014


When using oslo.messaging library for notification listener, one can use
either blocking or eventlet, when using eventlet as the executor, for some
reason, these threads in greenpool will block until all threads get a task
to run, then some of the thread will run. Here is the program to reproduce
the behavior:


from oslo.config import cfg
from oslo import messaging
import logging

class InfoEndpoint(object):
    def info(self, ctxt, publisher_id, event_type, payload, metadata):
        logging.log(payload)

transport = messaging.get_transport(cfg.CONF)
targets = [
    messaging.Target(exchange='nova', topic='notifications')
]

endpoints = [
    InfoEndpoint(),
]

server = messaging.get_notification_listener(transport, targets,
                                             endpoints,
executor='eventlet')

server.start()

server.wait()

Can anyone please explain why it behaves that way?

Tong Li
OpenStack Community Development
Building 501/B205
litong01 at us.ibm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140421/cfb13e97/attachment.html>


More information about the Openstack mailing list