Number of distinct (tenant, channel) subscriptions currently active.
(&self)
| 231 | |
| 232 | /// Number of distinct (tenant, channel) subscriptions currently active. |
| 233 | pub fn subscription_count(&self) -> usize { |
| 234 | let map = self.subscribers.read().unwrap_or_else(|p| p.into_inner()); |
| 235 | map.values().map(|v| v.len()).sum() |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | /// Normalize a channel name to lowercase, matching PG unquoted-identifier rules. |