Portal Community

Basic Usage

import { SubscribersMonitor } from '@edge-stream/observability-react';

function DevPanel() {
  return (
    <SubscribersMonitor
      showSettings={true}
      pollInterval={500}
      maxLogs={100}
    />
  );
}

Props

PropTypeDefaultDescription
classNamestring'page-container'CSS class for the outer div
styleCSSPropertiesInline styles for the outer div
showSettingsbooleantrueShow the Settings tab to toggle subscriber logging
pollIntervalnumber500How often (ms) to refresh from LoggingService
maxLogsnumber100Max number of recent message logs to retrieve

What SubscribersMonitor Displays

Live Monitor Tab

Settings Tab

Subscriber Log Data

// Each subscriberLog entry in a MessageActivityLog:
interface SubscriberLog {
  topic: string;
  status: 'delivered' | 'error' | 'queued';
  processingTime?: number;  // ms — time for subscriber callback to complete
  error?: Error;            // set if status === 'error'
  timestamp: Date;
}

Topic Grouping

SubscribersMonitor groups deliveries by topic to show traffic distribution at a glance:

// If your app has these subscriptions:
stream.subscribe('bas', 'workflow.*', workflowHandler);
stream.subscribe('bas', 'hil.*', hilHandler);
stream.subscribe('bas', 'notifications.*', notifyHandler);

// SubscribersMonitor will show topic badges like:
// workflow.taskCompleted  12
// hil.approvalRequired     3
// notifications.badge      8

Diagnosing Slow Subscribers

// Click a delivery row with a long processingTime to see:
// Message Delivery Summary
//   Message ID: msg-abc123
//   Topic: workflow.taskCompleted
//   Subscriber Deliveries: 2
//
//   Delivery Details:
//   ● workflowHandler  delivered  142ms
//   ● auditHandler     delivered   8ms

// A subscriber taking 142ms is slow — the pipeline may back up
// under high message volume. Consider async processing or
// moving heavy work off the callback thread.
Subscriber Errors Are Isolated If a subscriber callback throws, the error is caught by SubscriptionManager, logged in the subscriber log (status: 'error'), and the next subscriber still receives the message. SubscribersMonitor shows these as red rows — useful for spotting silent failures.