Astra Streaming quickstart

Astra Streaming is a serverless data streaming and event stream processing service integrated in the Astra Portal and powered by Apache Pulsar™. Using Astra Streaming, you can create Pulsar instances, manage streaming clusters, scale across cloud regions, and manage Pulsar resources such as topics, connectors, functions and subscriptions.

This quickstart demonstrates how to create and use a streaming tenant running Apache Pulsar.

Prerequisites

Create a streaming tenant

A Astra Streaming tenant is a portion of DataStax-managed Apache Pulsar that is only yours. Within tenants, you create namespaces, topics, functions, and more. To learn more about the concept of tenancy, see the Pulsar documentation.

You can create a tenant in the Astra Portal or programmatically. For this quickstart, use the Astra Portal.

  1. In the Astra Portal navigation menu, click Streaming.

  2. Click Create a Tenant.

  3. Name your streaming tenant something memorable like my-stream-RANDOM_UUID. All tenant names in Astra Streaming must be unique. RANDOM_UUID can be any string of letters and numbers, as long as it is unique.

  4. Choose your preferred cloud provider and region. For this example tenant, the region doesn’t really matter.

  5. Click Create Tenant. You are directed to the quickstart page for your new tenant.

    New tenant quickstart in Astra Streaming

Create a namespace in your tenant

Namespaces are logical groupings, such as environments or applications, for message topics within tenants.

Astra Streaming automatically creates a default namespaces when you create a tenant. You can use the default namespace or create other namespaces. Tenants usually have many namespaces. To learn more about namespaces, see the Pulsar documentation.

You can create namespaces in the Astra Portal or programmatically. For this quickstart, use the Astra Portal. For information about the Pulsar CLI or APIs, see Use Pulsar binaries with Astra Streaming and Form Astra Streaming HTTP requests.

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

  2. Click the Namespace And Topics tab, and then click Create Namespace.

  3. Enter a namespace name, and then click Create.

  4. Click "Create" to create the namespace.

Create a topic

Topics are the core construct of a messaging system. Topics provide a way to group messages matching certain criteria.

The name of the topic usually broadly defines the criteria. You can also apply more advanced characteristics, like schemas, at the topic level.

Topics are where other applications or services can "listen" for new messages. Consumers subscribe to topics to receive messages, and functions and connectors can listen for messages to trigger automated workflows.

In Pulsar, topic addresses are formatted like URLs, such as persistent://tenant/namespace/topic. To learn more about topics, see the Pulsar documentation.

As in the previous steps, you can create topics in the Astra Portal or programmatically.

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

  2. Click the Namespace And Topics tab.

  3. Locate a namespace where you want to create a topic, and then click Add Topic.

  4. Enter a topic name, and then click Add Topic.

    Topic names must start with a lowercase letter, and they can contain only letters, numbers, and hyphens (-).

    Disregard the Persistent and Partitioned options for now.

Next steps

Your new topic is ready to produce and consume messages. There are several different ways to do this:

  • Astra Portal: Use Astra Streaming’s "Try Me" feature in the Astra Portal.

  • Pulsar Client: Use the Pulsar CLI to interact with the topic.

  • Runtime Clients: Create a client application that interacts with Pulsar.

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