subscriberCount

Bun

Symbol

Server.subscriberCount

subscriberCount(topic: string): number

A count of connections subscribed to a given topic

This operation will loop through each topic internally to get the count.

@param topic

the websocket topic to check how many subscribers are connected to

@returns

the number of subscribers