Skip to main content

Module bus

Module bus 

Source
Expand description

The broker: a durable, keep-until-acked FIFO per recipient over HTTP.

The bus is deliberately dumb — it routes an opaque JSON payload to a recipient id, never inspects it, never verifies a signature, holds no keys. Messages persist in a Store until the recipient acks them, so a bus restart doesn’t lose anything queued for an offline agent. Delivery is at-least-once; the recipient dedupes by msg_id, so a redelivered message is harmless.

Recipients are Ed25519 public keys (base64). The bus treats them as strings.

Structs§

Broker
Envelope
A payload addressed to a recipient, stamped on arrival.

Constants§

DEFAULT_RECV_TIMEOUT_MS
ROSTER_TTL_MS
How long a presence announcement stays in the roster without a refresh. Nodes re-announce on a heartbeat, so the roster reflects who is currently online.