Users of the oslo.messaging RPC communications service must use
the rabbit ("rabbit://...") or AMQP 1.0 ("amqp://...") drivers.
Change-Id: If3474142f1fe99d41d7b4466061ed0e23ca38549
Closes-Bug: 1789259
zmq_options.register_opts() requires a TransportURL in the parameter
list. This patch creates an empty TransportURL and passes it since
there is no actual URL available.
Change-Id: I5954e430eedc5904594ee3be49d460de4b99d89a
Closes-Bug: #1675425
Since proxy supposed to be used in different configurations
second ROUTER socket may stay unused (e.g. when we use proxy
for publishing only fanout messages in mixed direct/pub-sub
configuration see ZmqClientMixDirectPubSub).
This patch introduces two modes of proxy SingleRouterProxy (where
frontend and backend ROUTERS are the same socket) and
DoubleRouterProxy (different sockets for the frontend and for the
backend - the original behavior).
Change-Id: Ia859b92e1f238fcbbcf42e17b06e0f4ad04e79f6
ZeroMQ driver options are current stored into the DEFAULT group.
This change makes the zmq configuration clearer by putting its
options into oslo_messaging_zmq group.
Change-Id: Ia00fda005b1664750d2646f8c82ebdf295b156fb
Closes-bug: #1417040
Co-Authored-By: Oleksii Zamiatin <ozamiatin@mirantis.com>
Currently proxy binds to a random port from a port range
specified in zmq config and therefore needs to register in
redis to become visible to clients and servers.
That could be done much simpler by using a static port(s) for
proxy. Moreover zmq handles reconnect to a socket if restarted
service uses the same port number as it had before restart.
Change-Id: I088792fd08a4161d08e9160830fc3ec4d560cca4
As for zmq we have a native thread running per each
zmq socket to perform async send/receive. Bandwidth
should increase by adding one more ROUTER socket to proxy.
We can not add more because it will increase the number
of connections, but with FE and BE sockets number of
connections will stay the same as with a single ROUTER,
because all clients will connect to FE, and all servers
will connect to BE.
Change-Id: Ib1f070a503272164ec0e9c28ce20530cfa6b79aa
In this change router was redesigned in a way most
appropriate for routing concept of zmq.ROUTER socket.
DEALER(cli)-ROUTER(proxy)-DEALER(srv) instead of
DEALER-ROUTER-DEALER-ROUTER (3 layers instead of 4)
The main reason is to use zmq.DEALER identity in message
routing. For this reason DealerConsumer was introduced
server-side. RouterConsumer is left for peer-to-peer
DEALER-ROUTER deployment option.
Also handled assertions in receive-methods in order
to not stop server when received message with wrong format.
Change-Id: If25edf500fa8d220d4233bb13d67121824e841c6
Closes-Bug: #1558601
Related-Bug: #1555007
Remove threading executor from publisher and router proxies
because each proxy is running in its own process.
Zmq native poller should be used for asynchronous polling.
Change-Id: Id8d6699cfd78ffbcd5b63773a6f2289183cd3126
Closes-Bug: #1569530
In this change 'use_router_proxy' option was added
to switch between direct connections and proxy.
Proxy was reimplemented and splitted onto two
types of proxies:
* PUBLISHER proxy for fanout pattern
* ROUTER proxy for direct messaging
Each type of proxy is configured over command line
argument --type.
Deployment guide was updated accordingly to the change.
Change-Id: If36e9c26e2a8ebe622cfa7e9f2a07b1a69aabe34
Closes-Bug: #1555007
Now we have situation when openstack projects like Mistral needs
extra oslo.messaging functionality.
But it is too complicated now to to implement something new and
integrate it with current code because there is a little bit mess.
1) Executor should be responsible for how to run jobs
(but now also has code with server logic)
2) Dispatcher should be responsible for routing message to the
target endpoint for processing (but it also has serialisation, sending replies,
executing some executor's callbacks etc)
3) Server should do all server specific logic, we need to have different
implementation of servers for RPC and notification, not different implementations
of dispatchers
This patch fixes 1-st point
Change-Id: Ib6408f408889bb7b7056722be636a5547b1a780d
Fixed pep8 errors:
* E127 continuation line over-indented for visual indent
* E226 missing whitespace around arithmetic operator
* E231 missing whitespace after ','
* E241 multiple spaces after ','
* E261 at least two spaces before inline comment
* E301 expected 1 blank line, found 0
* E302 expected 2 blank lines, found 1
* E303 too many blank lines (2)
* E501 line too long (80 > 79 characters)
Fixed pep8 warnings:
* W292 no newline at end of file
* W391 blank line at end of file
Change-Id: I1736f8a42c3a335a17a0b9b6e64782487ed3a495
The main issue with eventlet.green.zmq is that libzmq as a C-library
is completely monkey-patch unfriendly. So any blocking call inside
the native library makes calling process stuck. We can't avoid this
actually in an absolutely normal situation when a client appears
earlier than listener we have all client process get stuck until listener
raised. If the listener for example is also blocked awaiting for some
other service to appear we have a chain of locks which may occasionally
result in a dead-lock. The other situation with Notifier is quite similar.
For that reason zmq-broker was restored, but now it serves as an outgoing
queue on a client side. Servers remained the same dynamically port-binded.
Now all clients can still use green-zmq, but presence of the broker-queue
on a host guarantees that green threads will never blocked in a client
because all messages will wait their listeners inside the broker queue.
The broker process's modules are not monkey-patched, they make use of native
threading and native zmq.
Possibility to run without broker also remains. The option zmq_use_broker
introduced for that reason.
Closes-Bug: #1497315
Change-Id: I786b100fd6ee1cf4b99139db0ca044d358d36345
As far as we use redis as a name service we don't need a proxy,
becase we can pass binded port over name service too.
Change-Id: I59bbe2b34dcedfeef113ef06d6a988e1c413405e
- Fixed universal proxy to not get stuck with multiple backends
- Fixed threading pollers/executors (proxy side)
- Driver option to switch green/no-green impl.
- Swtiched to no-green in real-world proxy (green left for unit tests)
- Minor names fixes in serializer
Change-Id: Id6508101521d8914228c639ed58ecd29db0ef456
This patch adds possibility to re-raise on client's side exception, that
was raised on server side - serialize it on server side, restore and
re-raise on client.
Allowed to pass `allowed_remote_exmods` parameter from impl_zmq to
CallRequest class
Functional test CallTestCase.test_exception() passes now, so added it to
tox.ini. Modified zmq_receiver to be able run functional tests.
Change-Id: Ic055f3574962f3e80a0528d5d99320386303634e
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