[zmq] Properly analyse use_dynamic_connections option

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
This commit is contained in:
ozamiatin 2017-02-06 12:02:15 +02:00
parent 35bf674364
commit 35744c88d3

View File

@ -38,16 +38,20 @@ class ZmqClientMixDirectPubSub(zmq_client_base.ZmqClientBase):
conf.oslo_messaging_zmq.use_pub_sub:
raise WrongClientException()
publisher_direct = self._create_publisher_direct(conf, matchmaker)
publisher = self._create_publisher_direct_dynamic(conf, matchmaker) \
if conf.oslo_messaging_zmq.use_dynamic_connections else \
self._create_publisher_direct(conf, matchmaker)
publisher_proxy = self._create_publisher_proxy_dynamic(conf,
matchmaker)
matchmaker) \
if conf.oslo_messaging_zmq.use_dynamic_connections else \
self._create_publisher_proxy(conf, matchmaker)
super(ZmqClientMixDirectPubSub, self).__init__(
conf, matchmaker, allowed_remote_exmods,
publishers={
zmq_names.CAST_FANOUT_TYPE: publisher_proxy,
zmq_names.NOTIFY_TYPE: publisher_proxy,
"default": publisher_direct
"default": publisher
}
)