-
Notifications
You must be signed in to change notification settings - Fork 47
Usage Proxy
ran edited this page Jun 11, 2020
·
5 revisions
Refer to Deploy a cluster on bare metal
(http://pulsar.apache.org/docs/en/deploy-bare-metal/)
-
Prepare zookeeper cluster (refer to cluster deploy doc)
-
Initialize cluster metadata (refer to cluster deploy doc)
-
Prepare bookkeeper cluster (refer to cluster deploy doc)
-
copy the
pulsar-protocol-handler-amqp-${version}.nar
to the$PULSAR_HOME/protocols
directory -
start broker
broker config
messagingProtocols=amqp protocolHandlerDirectory=./protocols brokerServicePort=6651 amqpListeners=amqp://127.0.0.1:5672 amqpProxyEnable=true amqpProxyPort=5682
-
reset the number of the namespace public/default to 1
$PULSAR_HOME/bin/pulsar-admin namespaces delete public/default $PULSAR_HOME/bin/pulsar-admin namespaces create -b 1 public/default $PULSAR_HOME/bin/pulsar-admin namespaces set-retention -s 100M -t 3d public/default
-
prepare exchange and queue for test
ConnectionFactory connectionFactory = new ConnectionFactory(); connectionFactory.setVirtualHost("/"); connectionFactory.setHost("127.0.0.1"); connectionFactory.setPort(5682); Connection connection = connectionFactory.newConnection(); Channel channel = connection.createChannel(); String ex = "ex-perf"; String qu = "qu-perf"; channel.exchangeDeclare(ex, BuiltinExchangeType.DIRECT, true); channel.queueDeclare(qu, true, false, false, null); channel.queueBind(qu, ex, qu); channel.close(); connection.close();
-
download RabbitMQ perf tool and test
$RABBITMQ_PERF_TOOL_HOME/bin/runjava com.rabbitmq.perf.PerfTest -e ex-perf -u qu-perf -r 1000 -h amqp://127.0.0.1:5682 -p