A guide to configuring Pulsar binaries with Astra Streaming
Did we mention that Astra Streaming is running Apache Pulsar™?
All the benefits you enjoy with the open source Pulsar project can also be used on our platform. This guide details the necessary steps to getting set up and validating the connection.
Choosing a compatible version
Pulsar is distributed as a single artifact. The Pulsar download page↗ offers the latest version, as well as older releases.
Astra Streaming is currently compatible with Pulsar 2.10. Locate the latest patch version matching the major.minor version and download the binaries.
PULSAR_VERSION="2.10.??" wget https://archive.apache.org/dist/pulsar/pulsar-$PULSAR_VERSION/apache-pulsar-$PULSAR_VERSION-bin.tar.gz
Setting up your Pulsar folder
With the artifact downloaded, the next step is to extract its contents.
The following script will extract the tarball into a directory named for the pulsar version. This new directory is considered the "Pulsar folder". Pulsar guides typically assume you are working within this directory.
tar xvfz apache-pulsar-$PULSAR_VERSION-bin.tar.gz
You will see most Pulsar commands prefixed with "./bin".
That means you have
cd apache-pulsar-$PULSAR_VERSION and are running commands from there.
Configuring your binaries for Astra Streaming
The Pulsar folder contains quite a few files and folders, but two most important are
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, etc).
You will need to download the tenant configuration from Astra Streaming and overwrite the
Navigate to the "Connect" tab in the Astra Streaming portal.
Locate the "Download client.conf" button and click to download the conf file.
Save the file in the "/conf" folder of the Pulsar folder. This will overwrite the default client.conf already in the /conf folder.
With your Astra Streaming tenant’s configuration in place, you can use any of the binaries to interact with a Pulsar cluster.
Administrative commands to manage namespaces, topics, functions, connectors, etc.
Interactive commands for producing and consuming messages.
Validating your configuration and connection
With the Pulsar folder in place and the correct client configuration saved, the next step is to validate everything. Run each command to validate binary conf.
|For a full reference of all commands within the CLI, see the Pulsar’s CLI docs↗.|
List all tenants:
./bin/pulsar-admin tenants list
Produce a message:
./bin/pulsar-client produce <REPLACE_ME_WITH_TENANT_NAME>/default/<REPLACE_ME_WITH_TOPIC_NAME> --messages "Hi there" --num-produce 1
Now that your configuration is set up and validated, see: