Skip to main content

Module registry

Module registry 

Source
Expand description

§ReaderRegistry & Reader Tracking

Shared-memory registry for monitoring active consumers, tracking reader lag, calculating safe write headroom, and automatically reclaiming dead processes.

A slot is owned while pid != 0 and counts as a live reader while additionally active == 1. Ownership changes only through compare-and-swap on pid, so a scanner reclaiming a dead reader can never wipe out a registration that replaced it.

Liveness is judged by PID: readers in another PID namespace (e.g. a different container) look dead to the producer and are reclaimed. Share the PID namespace (--pid=host / a shared pod) when using lossless flow control across containers.

Structs§

ReaderInfo
Snapshot of an active reader’s status for monitoring.
ReaderRegistration
RAII registration handle for a consumer in ReaderRegistry.
ReaderRegistry
Shared memory registry holding reader registration slots.

Constants§

DEFAULT_MAX_READERS

Functions§

is_process_alive
Check if a process with pid is currently alive (in this PID namespace).