LogoLogo
WarpStream.comSlackDiscordContact UsCreate Account
  • Overview
    • Introduction
    • Architecture
      • Service Discovery
      • Write Path
      • Read Path
      • Life of a Request (Simplified)
    • Change Log
  • Getting Started
    • Install the WarpStream Agent / CLI
    • Run the Demo
    • "Hello World" for Apache Kafka
  • BYOC
    • Run the Agents Locally
    • Deploy the Agents
      • Object Storage Configuration
      • Kubernetes Known Issues
      • Rolling Restarts and Upgrades
    • Infrastructure as Code
      • Terraform Provider
      • Helm charts
      • Terraform Modules
    • Monitoring
      • Pre-made Datadog Dashboard
      • Pre-made Grafana Dashboard
      • Important Metrics and Logs
      • Recommended List of Alerts
      • Monitoring Consumer Groups
      • Hosted Prometheus Endpoint
    • Client Configuration
      • Tuning for Performance
      • Configure Clients to Eliminate AZ Networking Costs
        • Force Interzone Load Balancing
      • Configuring Kafka Client ID Features
      • Known Issues
    • Authentication
      • SASL Authentication
      • Mutual TLS (mTLS)
      • Basic Authentication
    • Advanced Agent Deployment Options
      • Agent Roles
      • Agent Groups
      • Protect Data in Motion with TLS Encryption
      • Low Latency Clusters
      • Network Architecture Considerations
      • Agent Configuration Reference
      • Reducing Infrastructure Costs
      • Client Configuration Auto-tuning
    • Hosted Metadata Endpoint
    • Managed Data Pipelines
      • Cookbooks
    • Schema Registry
      • WarpStream BYOC Schema Registry
      • Schema Validation
      • WarpStream Schema Linking
    • Port Forwarding (K8s)
    • Orbit
    • Enable SAML Single Sign-on (SSO)
    • Trusted Domains
    • Diagnostics
      • GoMaxProcs
      • Small Files
  • Reference
    • ACLs
    • Billing
      • Direct billing
      • AWS Marketplace
    • Benchmarking
    • Compression
    • Protocol and Feature Support
      • Kafka vs WarpStream Configuration Reference
      • Compacted topics
    • Secrets Overview
    • Security and Privacy Considerations
    • API Reference
      • API Keys
        • Create
        • Delete
        • List
      • Virtual Clusters
        • Create
        • Delete
        • Describe
        • List
        • DescribeConfiguration
        • UpdateConfiguration
      • Virtual Clusters Credentials
        • Create
        • Delete
        • List
      • Monitoring
        • Describe All Consumer Groups
      • Pipelines
        • List Pipelines
        • Create Pipeline
        • Delete Pipeline
        • Describe Pipeline
        • Create Pipeline Configuration
        • Change Pipeline State
      • Invoices
        • Get Pending Invoice
        • Get Past Invoice
    • CLI Reference
      • warpstream agent
      • warpstream demo
      • warpstream cli
      • warpstream cli-beta
        • benchmark-consumer
        • benchmark-producer
        • console-consumer
        • console-producer
        • consumer-group-lag
        • diagnose-record
        • file-reader
        • file-scrubber
      • warpstream playground
    • Integrations
      • Arroyo
      • AWS Lambda Triggers
      • ClickHouse
      • Debezium
      • Decodable
      • DeltaStream
      • docker-compose
      • DuckDB
      • ElastiFlow
      • Estuary
      • Fly.io
      • Imply
      • InfluxDB
      • Kestra
      • Materialize
      • MinIO
      • MirrorMaker
      • MotherDuck
      • Ockam
      • OpenTelemetry Collector
      • ParadeDB
      • Parquet
      • Quix Streams
      • Railway
      • Redpanda Console
      • RisingWave
      • Rockset
      • ShadowTraffic
      • SQLite
      • Streambased
      • Streamlit
      • Timeplus
      • Tinybird
      • Upsolver
    • Partitions Auto-Scaler (beta)
    • Serverless Clusters
Powered by GitBook
On this page
  • Running the WarpStream Agent
  • Create a Topic
  • Add Records To The Topic
  • Read Records From The Topic

Was this helpful?

  1. Getting Started

"Hello World" for Apache Kafka

PreviousRun the DemoNextRun the Agents Locally

Last updated 1 year ago

Was this helpful?

First, for your platform.

Running the WarpStream Agent

warpstream playground

The playground command will start an Agent on localhost, store all the data for the Agent in memory, and sign up for a temporary account for you to play around with.

Create a Topic

Let's create a topic using the Apache Kafka client built-in to the WarpStream Agent. We're going to assume in this tutorial you're running the Agent as specified above on localhost, so we'll omit the arguments to specify the Kafka bootstrap URL. Open a second terminal and issue the following command:

warpstream kcmd --type create-topic --topic helloworld2

If you don't receive an error back, your request to create the topic succeeded.

Add Records To The Topic

Now let's write a record to the topic. The kcmd tool writes records with a constant key of "hello", and we'll write two records with the payload of "world" as our example (,, ) is the delimiter).

warpstream kcmd --type produce --topic helloworld2 --records "world,,world"

You should receive output in your terminal that looks something like this:

result: partition:0 offset:0 value:"world" 
result: partition:0 offset:1 value:"world" 

Read Records From The Topic

warpstream kcmd --type fetch --topic helloworld2 --offset 0

Now you should see your records you wrote previously printed to the console. The key is always "hello" and the value field is the same "world" string we wrote before. You can repeat the process of writing another record and running kcmd --type fetch again to read and write more records.

result: partition:0 offset:0 key:"hello" value:"world"
result: partition:0 offset:1 key:"hello" value:"world"

And that's it! You've successfully set up a WarpStream Agent Pool to power your Virtual Cluster, created a topic, and processed some data through it.

You can now move on to trying to create a real application which reads or writes from the topic, or connect your existing tools like Flink to WarpStream.

install the WarpStream Agent