cc1cb30321
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
30 lines
712 B
Bash
Executable File
30 lines
712 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
. tools/functions.sh
|
|
|
|
DATADIR=$(mktemp -d /tmp/OSLOMSG-ZEROMQ.XXXXX)
|
|
trap "clean_exit $DATADIR" EXIT
|
|
|
|
export TRANSPORT_URL=zmq://
|
|
export ZMQ_MATCHMAKER=redis
|
|
export ZMQ_REDIS_PORT=65123
|
|
export ZMQ_IPC_DIR=${DATADIR}
|
|
|
|
cat > ${DATADIR}/zmq.conf <<EOF
|
|
[DEFAULT]
|
|
transport_url=${TRANSPORT_URL}
|
|
rpc_zmq_matchmaker=${ZMQ_MATCHMAKER}
|
|
rpc_zmq_ipc_dir=${ZMQ_IPC_DIR}
|
|
use_router_proxy=True
|
|
[matchmaker_redis]
|
|
port=${ZMQ_REDIS_PORT}
|
|
EOF
|
|
|
|
redis-server --port $ZMQ_REDIS_PORT &
|
|
|
|
oslo-messaging-zmq-proxy --type PUBLISHER --config-file ${DATADIR}/zmq.conf > ${DATADIR}/zmq-publisher.log 2>&1 &
|
|
oslo-messaging-zmq-proxy --type ROUTER --config-file ${DATADIR}/zmq.conf > ${DATADIR}/zmq-router.log 2>&1 &
|
|
|
|
$*
|