Get Live Count
Catalyst Data Streams allows you to track the number of active subscribers currently connected to a specific channel. This is useful for monitoring channel activity and implementing conditional logic based on subscriber presence.
You can retrieve the live subscriber count by passing the channel ID to the get_live_count() method. The data_streams reference used below is the component instance created earlier. To know more about this instance, please refer to this section.
Parameters Used
| Parameter Name | Data Type | Definition |
|---|---|---|
| channel_id | String | A Mandatory parameter. Holds the unique ID of the channel. |
copy
# Get live count (active subscribers)
live_count = data_streams.get_live_count("CHANNEL_ID")
Last Updated 2026-08-13 17:11:55 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit