KB-7F02
IU Core Event Worker — 05 Observability, healthcheck, disable/rollback runbook
3 min read Revision 1
dieu44iu-core-mvpevent-workerobservabilityhealthcheckdisable-runbookv0.62026-05-21
IU Core Event Worker — 05 Observability, healthcheck, disable/rollback
Observability views (009)
| View | Answers |
|---|---|
v_iu_route_attempt_summary |
route attempt counts by route_kind/route_code/status + first/last — the delivery audit summary |
v_iu_event_backlog |
unconsumed iu-domain event_outbox rows ahead of each worker cursor |
v_iu_route_dead_letter_open |
unresolved dead-letter events awaiting replay |
Healthcheck command
SELECT public.fn_iu_route_worker_health('iu_outbound_default');
Returns jsonb: master_gate_open, worker_gate_open, registered, cursor
position, last_run_at, run totals, backlog_iu_events, dead_letter_open,
outbound_attempts_in_audit, and a healthy boolean
(master_gate_open AND dead_letter_open=0).
Verification
runtime/070_route_worker_verification.sql — read-only, BEGIN … ROLLBACK,
checks W1–W9 (tables, functions, views, gate, cursor, seam fails closed, dual
gate, health, backlog). Safe to run on production any time.
Disable runbook (fastest → most thorough)
The worker has its own kill-switch, separate from the IU Core master gate.
- L0 — worker gate (
runtime/080_route_worker_disable.sql):UPDATE public.dot_config SET value='false', updated_at=now() WHERE key='iu_core.route_worker_enabled';fn_iu_route_worker_runinstantly no-ops — no claim, no attempt, no cursor advance. This alone fully stops the worker. - L1 — master gate:
dot_config 'iu_core.routes_master_enabled'='false'— stops emission globally too. - L2 — routes:
UPDATE iu_outbound_route SET enabled=false. - L3 — triggers:
DROP TRIGGER trg_iu_out_version ….
Re-enable the worker: set the worker gate key back to 'true'.
Rollback
| Rollback file | Reverses | Guard |
|---|---|---|
runtime/rollback/060_route_worker_activate.rollback.sql |
gate key + cursor | REFUSES while gate true, or if cursor saw events / has dead-letters |
rollback/009_route_worker_functions.rollback.sql |
5 functions + 3 views | drops in reverse dependency order (run before 008) |
rollback/008_route_worker_substrate.rollback.sql |
2 tables | REFUSES to drop a non-empty table — live recovery history is never lost |
Order: 060 → 009 → 008. The substrate rollback depends on the function rollback running first.