Skip to content

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/)

  1. Prepare zookeeper cluster (refer to cluster deploy doc)

  2. Initialize cluster metadata (refer to cluster deploy doc)

  3. Prepare bookkeeper cluster (refer to cluster deploy doc)

  4. copy the pulsar-protocol-handler-amqp-${version}.nar to the $PULSAR_HOME/protocols directory

  5. start broker

    broker config

    messagingProtocols=amqp
    protocolHandlerDirectory=./protocols
    brokerServicePort=6651
    amqpListeners=amqp://127.0.0.1:5672
    
    amqpProxyEnable=true
    amqpProxyPort=5682
  6. 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
  7. 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();
    
  8. download RabbitMQ perf tool and test

    (https://bintray.com/rabbitmq/java-tools/download_file?file_path=perf-test%2F2.11.0%2Frabbitmq-perf-test-2.11.0-bin.tar.gz)

    $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
Clone this wiki locally