13 Commits

Author SHA1 Message Date
Mehdi Abaakouk
d94d6d6892 Allows to change defaults opts
This change introduces to possibility for the consumer application
to change the default oslo.messaging config options.

Same API interface as oslo.db have been taken.
The first option is executor_thread_pool_size.

This option was called rpc_thread_pool_size, but because it's used by
notification and rpc 'executor_thread_pool_size' looks a better name.

Changing executor_thread_pool_size default will be useful for ceilometer
the default of 64 is really to small to consume many notifications at
once for batching them. When is clearly sufficient for rpc stuffs.

Change-Id: Iea0d7a72e38d27c600403c815258aa5eee0d0c8c
2015-07-20 15:37:16 +02:00
Mehdi Abaakouk
c49594a62f Remove usage of contentmanager for executors
The context manager in the executor fit only for the blocking executor.
Even the dispatcher needs to run code before and after the application
callback, eventlet and future executors have to run the pre/post code
into the main thread and can run the callback into an other thread,
and that force them to run __enter__ and __exit__ manually and deal
the exception path.

This change adds a helper object instead of the context manager.
It is designed to be explicit on what must be executed
before and after the callback and what can be done in a thread or not.

All the executor code is now in the impl_pooledexecutor.py
and use the futures "PoolExecutor" API.

This use futurist to provide a eventlet and aioeventlet futures friendly
object.

Change-Id: I8cd7640f36beeda47560e3c82671bad3530e38d1
2015-07-08 13:42:10 +02:00
Doug Hellmann
0a8c5145d4 Add drivers to the documentation
Use stevedore.sphinxext to populate a new page listing all available
drivers.

Add docstrings to the driver classes, including references to more
extensive documentation if it is available.

Depends-on: I1a24f9326b4e54174d9dc0ae366315fe29c3ac1b
Depends-on: Ie715f98fe0d3cba8b2f4f6235e7c2b6f79be7ea0

Change-Id: Ief0aa05e6deba0126d63faf13497d0fe0539e08d
2015-06-03 11:40:57 +00:00
Jenkins
87137e7af0 Merge "zmq: Add support for ZmqClient pooling" 2015-05-11 01:49:21 +00:00
James Page
de015d5c83 zmq: Add support for ZmqClient pooling
To avoid creating a new ZMQ connection for every message sent
to a remote broker, implement pooling and re-use of ZmqClient
objects and associated ZMQ context.

A pool is created for each remote endpoint (keyed by address);
the size of each pool is configured using rpc_conn_pool_size.

All outbound message client connections are pooled.

Closes-Bug: 1384113
Change-Id: Ia55d5c310a56e51df5e2f5d39e561a4da3fe4d83
2015-04-26 11:01:04 +01:00
Victor Stinner
45ca27a8a7 Port ZMQ driver to Python 3
* Fix bytes/unicode issues in the ZMQ driver
* Add pyzmq test dependency on Python 3
* Enable (indirectly) ZMQ driver tests on Python 3

Change-Id: I812f1ec7ad2dcd8e16af70d6f8f9bc3cf7a2225c
Depends-on: I0efae1c91c5d830156b867d7d21b5c0065094665
2015-04-16 15:50:03 +02:00
Jenkins
c5c6deb410 Merge "Don't raise Timeout on no-matchmaker results" 2015-03-26 15:31:16 +00:00
Li Ma
53fde06c44 Add pluggability for matchmakers
Closes-Bug: #1291701

Change-Id: I2a10eca0760ef84f34e5dcdb8132845b88cd4b98
2015-03-19 03:03:53 -07:00
Li Ma
f033fc9436 Don't raise Timeout on no-matchmaker results
This patch was proposed by this review:
https://review.openstack.org/#/c/31231

The unit test is added.

Change-Id: Ie124dc22f4ef3bbaeed76186cf08924a39b52812
Co-Authored-By: Eric Windisch <ewindisch@docker.com>
Closes-Bug: #1186310
2015-03-19 00:32:01 -07:00
joyce
8380ac6e66 Fix notifications broken with ZMQ driver
The notification message did not contain a method keyword,
so it was ignored by consumers. Another in dispatch, the
notification msg confilict with other method.

Change-Id: I7c60c6f80006222d3cbe818d32288d043b55a7b8
Closes-Bug:#1368154
2015-02-02 12:04:24 +08:00
Doug Hellmann
ee31a84719 Update Oslo imports to remove namespace package
Change-Id: I4ec9b2a310471e4e07867073e9577731ac34027d
Blueprint: drop-namespace-packages
2015-01-21 21:09:33 -05:00
Victor Stinner
1fa0e6a8fe Port zmq driver to Python 3
With eventlet 0.16, it becomes possible to run Oslo Messaging tests on
Python 3 with eventlet.

This change ports the zmq driver to Python 3:

* encode the topic explicitly to UTF-8
* use a list comprehension instead of map() to also get a list
  on Python 3 (not a generator)

The following eventlet change is needed to run tests:
https://github.com/eventlet/eventlet/pull/187

Related eventlet issue:
https://github.com/eventlet/eventlet/issues/185

I will propose a different change to enable tests with eventlet enabled
when a release of eventlet including this fix will be available.

Change-Id: Ic8fec515cfa757e08ffb9604e3bfb2e87d08f3d8
2015-01-13 10:58:53 +00:00
Doug Hellmann
e55a83e832 Move files out of the namespace package
Move the public API out of oslo.messaging to oslo_messaging. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.

bp/drop-namespace-packages

Co-authored-by: Mehdi Abaakouk <mehdi.abaakouk@enovance.com>
Change-Id: Ia562010c152a214f1c0fed767c82022c7c2c52e7
2015-01-12 12:50:41 -05:00