ConfigOptsProxy have been implemented only pika driver while
the oslo.messaging allow to pass the query string for all drivers.
This change fixes that.
Closes-Bug: #1666903
Closes-Bug: #1607889
Next step is to validate the query with ConfigOptsProxy, to
raise appropriate exception in case of mis-configuration.
Change-Id: I573334e774ccf33ecd27a85067045f3c6489ee89
kafka doesn't play well with //, each times a new partition/topic is
created, kafka rebalances things across brokers and messages are not
delivered at the expected time.
So this change disable the parallelizism for functional tests for kafka
only.
Change-Id: Ia497334efcd4685850ac1529a7fc38073dae7cd1
ack/requeue messages are currently done in the
MessageHandlingServer._process_incoming().
But _process_incoming() in run by a futurist Executor.
That can be a threading or an eventlet executor.
With eventlet, we don't really share the socket between threads.
But with threading executor and expecialy ssl, this can't work, if you
write data with two different threads to the socket.
This change moves back the message ack/requeue to the polling threads
that handle the connection, instead of the threads we spawn for the
application.
Oslo Messaging now always use a connection in the same thread.
Change-Id: I5c0e6def6b34f4d195fb1f8dbb26eda0f21ff34e
In this change new configurations appeared in Ocata release
like dynamic connections and other types of proxied deployments
being described.
Change-Id: Id6e9b062101d8916323edc143ea5379585192581
For dynamic connections it is crucial to close connection
and not to have hanging sockets either we have sent message
successfully or not.
eventlet.green.zmq by default blocks the calling thread on sending message
when connection was not established yet (which is correct DEALER
socket behavior though), but socket cannot be closed when we hang on
sending forever (if we never get the valid host to connect).
eventlet also shields EAGAIN exception in default (blocking) sending mode
so we need to use async zmq.NOBLOCK flag to receive this exception
and hanlde it in our own way to not block forever.
Change-Id: Ib561e061c4b20644213c059a8e8d0efd225edea1
Closes-Bug: #1658913
Closes-Bug: #1663459
- kombu4 wraps recoverable errors as OperationalErrors rather than
raising amqp errors
- also, raise a recoverable error and redeclare if for some reason a
message is double acknowledged... previously, this was hidden.
- ensure socket is not none
- use connect method to ensure connection
Depends-On: I9f980b51901ac31599b9651633956ad2eea6a1ac
Change-Id: I73958c8057353a2eefe1baaa7a41148193d507f7
The mock module has been added to Python 3.3 as unittest.mock.
The third party mock module doesn't seem to be maintained anymore.
This is follow up of 72c501454ea33b603918de35565a66dda8abd66a and
add hacking rule to avoid regression issue.
oslotest prepares mock for six in oslotest/__init__.py as follow:
six.add_move(six.MovedModule('mock', 'mock', 'unittest.mock')) and
oslo_messaging/tests/__init__.py imports oslotest before importing
test submodules to setup six.moves for mock, then "from six.moves
import mock" works well.
Note: unittest.mock also detects wrong usage of method
assert_called_once_with.
Change-Id: I3d09733789cfa2550cf47c24f2553357d36bcc0d
We need to pass into VersionInfo what one would expect from running:
setup.py --name
Right now we pass in say oslo_context and pbr fails if there is no .git in
the python source tree
Closes-Bug: #1662266
Change-Id: I45d2edddfd516f65e1589e9b7816f1256e3f0d24
Option use_dynamic_connections has to be counted when direct
publisher is being created along with proxy publisher (ZmqClientMixDirectPubSub).
Change-Id: If0d5674d7015b164095a437464d3c780db892e19
Closes-Bug: #1662134
Dummy does not have value aging mechanisms and value
filtering mechanisms. Like redis, we should use these
two mechanisms
Change-Id: I58d73e6b15a601e9e95274d47e822ae54ef5f5ba
Closes-Bug: #1658940
ZeroMQ manages failover automatically when socket is
being connected to multiple hosts. Dynamic connections
mode assumes to connect once per message so we connect
only to a single host. However we cannot say for sure
if this host is still alive. For failover reasons
we can connect to a primary host and then add some
more hosts as failover and let ZeroMQ to decide where
it finally sends the message.
Change-Id: I19cbb75aaea8a0b725dd6a8ff665392738e164a1
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.
Change-Id: I2a00ead626d9eced96487ee82b5d7857126d8355
The driver incorrectly set up SSL client authentication. This patch
fixes the configuration. Unit tests added.
Change-Id: I64b1736f5a708c70013d9fedba73da4fa8d9ccfb
Closes-Bug: #1606985
For zmq.DEALER socket there are two round-robin modes exist,
controlled by zmq.IMMEDIATE option. Immediate True means sending
only to running servers and False means to send to all connected
servers (may be not up and running at the moment).
If we do all messaging over DEALER socket as we do for direct
connections, immediate=True better suits for direct CALL/CAST
message types and immediate=False is better for fanout.
This patch fixes things for dynamic connections as for static
we already used the approach.
Change-Id: I70c7aeb3c7a2c63c128bec394827577cab580def