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.

  1. 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
  2. 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.

  1. In the Astra Portal navigation menu, click Streaming, and then select your tenant.

  2. Click the Connect tab, in the Pulsar CLI section, click Download client.conf.

  3. Save the file in apache-pulsar-PULSAR_VERSION/conf. This overwrites the default client.conf in the /conf folder.

  4. 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 messages

      For 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.

  1. List all tenants:

    ./bin/pulsar-admin tenants list
  2. Produce a message:

    ./bin/pulsar-client produce TENANT_NAME/NAMESPACE_NAME/TOPIC_NAME --messages "Hi there" --num-produce 1

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com