1. MooseStack
  2. Moose Streaming

On this page

OverviewBasic UsageEnabling StreamingCore CapabilitiesIntegration with Other Capabilities

Moose Streaming

Overview

The Streaming module provides standalone real-time data processing with Kafka/Redpanda topics. You can use this capability independently to build event-driven architectures, data transformations, and real-time pipelines without requiring other MooseStack components.

Basic Usage

Export Required

Ensure your Stream is correctly exported from your app/index.ts file.

Example: export { exampleStream }

Learn more about export pattern: local development / hosted.

import { Stream } from "@514labs/moose-lib"; interface ExampleEvent {  id: string;  userId: string;  timestamp: Date;  eventType: string;} // Create a standalone stream for eventsexport const exampleStream = new Stream<ExampleEvent>("streaming-topic-name", {  // Optional: specify destination table  destination: new OlapTable<ExampleEvent>("table-name")}); // Add consumers for real-time processingexampleStream.addConsumer((event) => {  console.log("Processing event:", event);  // Custom processing logic here});

Enabling Streaming

To enable streaming, you need to ensure that the streaming_engine feature flag is set to true in your moose.config.toml file:

[features]streaming_engine = true

Core Capabilities

Streams
Create Streams
Define and create Kafka/Redpanda topics with type-safe schemas
Publishing
Publish Data
Write data to streams from applications, APIs, or external sources
Consuming
Consumer Functions
Read and process data from streams with consumers and processors
Transformation
Streaming Transformations
Process and transform data in-flight between streams

Integration with Other Capabilities

The Streaming capability can be used independently, or in conjunction with other MooseStack modules:

Moose OLAP
Sync data from streams to tables to persist data and enable fast analytical queries on top of it
Learn More →
Moose APIs
Create APIs to route data into streams from your other applications or webhooks
Learn More →
FiveonefourFiveonefour
Fiveonefour Docs
MooseStackTemplates
Changelog
Source506
  • Overview
  • Quick Start
  • Templates / Examples
Fundamentals
  • Moose Runtime
  • MooseDev MCP
  • Data Modeling
MooseStack in your App
  • App / API frameworks
Modules
  • Moose OLAP
  • Moose Streaming
    • Manage Streams
    • Create Streams
    • Sync to OLAP
    • Dead Letter Queues
    • Functions
    • Consumer Functions
    • Transformation Functions
    • Writing to Streams
    • From Your Code
    • Schema Registry
    • From CDC Services
  • Moose Workflows
  • Moose APIs
Deployment & Lifecycle
  • Moose Migrate
  • Moose Deploy
Reference
  • API Reference
  • Data Types
  • Table Engines
  • CLI
  • Configuration
  • Observability Metrics
  • Help
  • Changelog
Contribution
  • Documentation
  • Framework