Skip to main content

Module topic

Module topic 

Source
Expand description

A schema topic’s runtime handle on db = Postgres (docs/design/subscriptions-websocket.md §3.4, slice S4): the backplane-only [TopicHandle] from cratestack-core, plus publish_in_tx, which sends from inside a transaction so the message is delivered only if it commits, in commit order with the transaction’s model events. It needs a backplane the transaction can notify (PgNotifyBackplane, the default).

A topic taken from an @isolation procedure’s handle is bound to the procedure’s attempt: its publish is delivered only if the attempt commits, whichever backplane carries it (PgNotifyBackplane notifies inside the transaction, any other sends after the commit).

Structs§

Topic
One topic under one key. Cheap to build; hold none. subscribe and channel are the [TopicHandle]’s; publish is this type’s own, so a topic bound to an @isolation attempt rides it.