Monitor the health of every channel connection

The platform continuously watches every connection — both by actively probing it on a fixed schedule and by counting real send/receive failures as they happen — so an Admin learns a channel has broken before customers notice, and learns again once it has recovered.

When this happens: (A) ChannelHealthCheckJob's 5-minute cycle. (B) A real send or receive attempt against the connection fails or succeeds.

How it works

  • ChannelHealthCheckJob selects every connection with State ∈ {Active, Degraded, Error, RequiresReauth}.
  • For each, calls the provider's lightweight probe endpoint through the channel's provider adapter.
  • On success, updates LastSuccessfulSyncAt; if the connection was Degraded or Error, treats it as a recovery signal.
  • On failure, records a ChannelConnectionErrorLog entry and increments ConsecutiveFailures.
  • Where the updated ConsecutiveFailures crosses the warn (3) or error (10) threshold, transitions State to Degraded or Error respectively, and fires the FR-10 UC-10.9 admin notification.

Other paths

Recovery

A probe or a real send/receive succeeds on a Degraded or Error connection. ConsecutiveFailures resets to 0, State returns to Active, and a connection recovered notification is sent — distinct from the original problem notification.

Repeat failure on an already-known problem

The connection is already RequiresReauth and the next probe cycle fails again for the same reason. No new notification is sent within 24 hours of the last one for this open problem.

If something goes wrong

Inbound messages still accepted while broken

A connection in Error or RequiresReauth still receives an inbound webhook delivery. The generic webhook pipeline accepts and stores it regardless of State — health monitoring governs outbound sending and the admin-facing state, not inbound acceptance.

Good to know

  • ConsecutiveFailures ≥ 3 moves Active to Degraded; ≥ 10 moves Degraded to Error. A clearly rejected credential moves straight to RequiresReauth.
  • Any success resets the counter and restores Active.
  • A degradation, error or reauth-required transition notifies every EasyCrm.Channels.Manage holder once per transition, not once per failure.
  • Health monitoring never blocks inbound message receipt.