bin/
directory after downloading and extracting the Pulsar distribution. These tools offer a range of capabilities, including starting and stopping Pulsar, managing tenants, namespace, & topics, and doing other operations such as benchmarking. To learn how to use each tool, simply run it with no argument or use the --help
argument for detailed instructions.
Most of the Pulsar client CLI tools use a configuration file client.conf
stored in the conf/
directory to connect to a Pulsar cluster. You can edit this file to specify the required information to connect to your StreamNative Cloud cluster.
webServiceUrl
property in the client.conf
file.
brokerServiceUrl
property in the client.conf
file.
token:<api-key>
to the authParams
property in the client.conf
file. <api-key>
is the value you copied in the previous step.
authPlugin
property in the client.conf
file to org.apache.pulsar.client.impl.auth.AuthenticationToken
.
pulsar-admin
tool to run admin operations on your StreamNative Cloud cluster. For example, you can use the following command to list all the available tenants in your cluster:
pulsar-client
tool to produce messages to a Pulsar topic. For example, you can use the following command to produce 10 messages to a topic named my-topic
:
pulsar-client
tool to consume messages from a Pulsar topic. For example, you can use the following command to consume 10 messages from a topic named my-topic
: