-
Notifications
You must be signed in to change notification settings - Fork 45
Usage Proxy
ran edited this page May 31, 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}.narto the$PULSAR_HOME/protocolsdirectory -
start broker
broker config
defaultNumberOfNamespaceBundles=1
messagingProtocols=amqpn
protocolHandlerDirectory=./protocols
brokerServicePort=6651
amqpListeners=amqp://127.0.0.1:5672
useProxy=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 qu for test
ConnectionFactory connectionFactory = new ConnectionFactory();
connectionFactory.setVirtualHost("default");
connectionFactory.setHost("127.0.0.1");
connectionFactory.setPort(5681);
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:5681 -p