Data Streams JavaScript SDK
Data Streams is a Catalyst CloudScale component that streams real-time, event-driven data from publishers to subscribers through channels. It follows a publish-subscribe model: data published to a channel reaches every subscribed client in real time over WebSocket connections.
The Data Streams JavaScript SDK package enables you to fetch the channels in your project, publish data to a channel, generate the token pair a subscriber needs to connect, track the number of active subscribers, and subscribe to a channel over WebSocket.
Prerequisites
You need to install the following package to be able to use the Data Streams SDK methods.
Import Requirement
You need to import the following modules to use the Data Streams SDK methods.
const { DataStreams, DataStreamsWebSocket } = require('@zcatalyst/datastreams');//Data Streams modulesList of SDK Methods
The following table contains the list of SDK methods that can be used to perform Data Streams operations through code.
| Category | SDK Method | Required Scope |
|---|---|---|
| General Operations | Get Data Streams Instance | Not required |
| Channel Operations | Get Channels | Admin |
| Generate Token Pair | Admin | |
| Get Live Count | Admin | |
| Publish Data | Admin | |
| Subscriber Operations | WebSocket Connection | Not required |
Last Updated 2026-12-01 21:24:40 +0530 IST
Yes
No
Send your feedback to us