[zmq] Fix slow down

Restore use_pub_sub to default True.
Fix broker closed by mistake.

Change-Id: Ibc370d401d233059f7cbe8e7d5b15136910c8be7
This commit is contained in:
Oleksii Zamiatin 2016-01-28 14:30:04 +02:00
parent 547988a26e
commit e7d6e92ea7
2 changed files with 3 additions and 4 deletions

View File

@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import contextlib
import logging
import sys
import time
@ -33,8 +32,8 @@ def main():
CONF(sys.argv[1:], project='oslo')
logging.basicConfig(level=logging.DEBUG)
with contextlib.closing(zmq_broker.ZmqBroker(CONF)) as reactor:
reactor.start()
reactor = zmq_broker.ZmqBroker(CONF)
reactor.start()
while True:
time.sleep(1)

View File

@ -70,7 +70,7 @@ zmq_opts = [
help='Expiration timeout in seconds of a name service record '
'about existing target ( < 0 means no timeout).'),
cfg.BoolOpt('use_pub_sub', default=False,
cfg.BoolOpt('use_pub_sub', default=True,
help='Use PUB/SUB pattern for fanout methods. '
'PUB/SUB always uses proxy.'),