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 getLiveCount() method.

Sample Code Snippet


Package Imports
copy
import com.zc.component.datastream.ZCDatastream;
import com.zc.component.datastream.beans.ZCChannelLiveCountResponse;
copy
//Create a Data Streams instance
ZCDatastream datastream = ZCDatastream.getInstance();
//Get the live subscriber count for a channel
ZCChannelLiveCountResponse liveCount = datastream.getLiveCount("CHANNEL_ID");

Last Updated 2026-07-07 10:52:22 +0530 IST

ON THIS PAGE

RELATED LINKS

Data Streams