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.
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});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 = trueThe Streaming capability can be used independently, or in conjunction with other MooseStack modules: