ExESDB.SubscriptionHealthMonitor (ex_esdb v0.11.0)

Monitors the health of subscriptions and their associated emitter pools.

This module provides comprehensive health monitoring for the subscription system:

  • Detects stale subscriptions (subscriber process is dead)
  • Identifies orphaned emitter pools (pools without corresponding subscriptions)
  • Finds missing emitter pools (subscriptions without pools on leader nodes)
  • Automatically triggers cleanup and recovery actions
  • Provides detailed health reports for observability

The monitor runs periodic health checks and can be triggered manually for immediate diagnostics.

Summary

Functions

Returns a specification to start this module under a supervisor.

Force cleanup of a specific subscription or emitter pool.

Perform an immediate health check and return the results.

Get the last health report without performing a new check.

Enable or disable automatic cleanup of detected issues.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

force_cleanup(store_id, cleanup_action)

Force cleanup of a specific subscription or emitter pool.

health_check(store_id)

Perform an immediate health check and return the results.

last_health_report(store_id)

Get the last health report without performing a new check.

set_cleanup_enabled(store_id, enabled)

Enable or disable automatic cleanup of detected issues.

start_link(opts)