Skip to main content

Module hub

Module hub 

Source
Expand description

The console hub the connection services own (SRV-012 R4, R6, R7, R9).

It holds the topology, the tap, one tap subscription per console.tap.<target> channel with at least one subscriber, and the pump that turns them into records.

The pump runs on the publisher’s thread and never publishes while it holds a hub lock: it takes what is due under the lock, lets go, publishes, and puts back what failed. A tap with a pending record is not drained, so its ring stays the only buffer and ring eviction the only loss, which the next batch’s dropped reports. One tap’s failure never stops the others: it is returned once every tap has been drained, published and retired. The pending records and unread ring of a tap whose last subscriber left go with it, as do the unsent records of a tap attached anew before they were put back; nobody is left to read them, so they are counted by name in tap_records_abandoned and tap_messages_abandoned, not in console_records_lost.

Structs§

ConsoleHub
The console’s state, owned by the connection services.
PumpReport
What one pump did.

Constants§

MAX_LIVE_TAPS
The most taps live at once (R6); one more is CONSOLE_TAP_LIMIT_REFUSED.
TAP_SUBJECT_PREFIX
The prefix of every tap stream’s subject; the rest names the target.
TOPOLOGY_SUBJECT
The topology stream’s subject.

Functions§

tappable
Whether the tap hook may observe a publish on subject: never one under console. (the console’s own records).