Skip to content

Event topics

Plugins communicate through the typed event bus (fn-70): topics are declared with a schema, retention policy, and delivery mode, then emitted and subscribed via context.events:

  • declareTopic(spec) — requires events.topic.declare
  • emitTopic(name, payload) — requires events.emit
  • subscribeTopic(name, handler) — requires events.subscribe
  • replay(name, opts) — requires events.replay
  • listTopics() — requires events.inspect

Delivery modes: atMostOnce, atLeastOnce (retry/backoff/dead-letter), and ordered (partitioned). See EventsAPI, TopicSpec, and EventEnvelope in the API Reference.

Topic naming: public core-plugin topics use the owning plugin’s prefix (e.g. actions.receipt.written, scheduler.job.cancelled, notifications.delivered). Topics prefixed _host.* are host-internal — third-party plugins cannot subscribe to them.