Use Pulsar binaries with Astra Streaming
Astra Streaming runs Apache Pulsar™. The benefits of OSS Pulsar are also available in Astra Streaming.
To get started, you must download a compatible Pulsar artifact, and then configure the binaries for use with Astra Streaming.
Download a compatible artifact
Astra Streaming is compatible with Pulsar 2.10.
-
Download the binaries for the latest 2.10 patch version:
PULSAR_VERSION="2.10.PATCH" wget https://archive.apache.org/dist/pulsar/pulsar-$PULSAR_VERSION/apache-pulsar-$PULSAR_VERSION-bin.tar.gz
-
Extract the downloaded artifact:
tar xvfz apache-pulsar-$PULSAR_VERSION-bin.tar.gz
The resulting directory is named
apache-pulsar-PULSAR_VERSON
. This directory is known as the Pulsar folder. Pulsar guides assume you are working within this directory. Pulsar commands prefixed by./bin
indicate the command is run from within the Pulsar folder.
Configure binaries for Astra Streaming
There are several files and folders in the Pulsar folder.
The two most important folders are /conf
and /bin
.
The executables in /bin
use the configurations in /conf
to run commands.
Each tenant you create in Astra Streaming comes with its own custom configuration for SSO, endpoints, and so on.
You must download the tenant configuration from Astra Streaming, and then overwrite the ./conf/client.conf
file.
-
In the Astra Portal navigation menu, click Streaming, and then select your tenant.
-
Click the Connect tab, in the Pulsar CLI section, click Download client.conf.
-
Save the file in
apache-pulsar-PULSAR_VERSION/conf
. This overwrites the defaultclient.conf
in the/conf
folder. -
With your Astra Streaming tenant’s configuration in place, use the binaries to interact with a Pulsar cluster:
-
./bin/pulsar-admin
: Administrative commands to manage namespaces, topics, functions, connectors, and so on -
./bin/pulsar-client
: Interactive commands for producing and consuming messagesFor a full reference of all commands within the CLI, see the Pulsar’s CLI docs.
-
Validate the connection
Run some commands to validate the binary configuration.
-
List all tenants:
./bin/pulsar-admin tenants list
-
Produce a message:
./bin/pulsar-client produce TENANT_NAME/NAMESPACE_NAME/TOPIC_NAME --messages "Hi there" --num-produce 1