EventDurability

Trait EventDurability 

Source
pub trait EventDurability:
    Send
    + Sync
    + Debug {
    // Required methods
    fn append(&self, event: &Event);
    fn ack(&self, id: &str);
    fn unacked(&self) -> Vec<Event>;
}
Expand description

REL-14 (#249): the durability seam for the event bus. The events domain owns the trait; the dataplane (which already holds both the StateStore and the EventBus) provides a concrete implementation that wraps StateStore methods. This keeps the dependency direction correct: events does not import state.

Required Methods§

Source

fn append(&self, event: &Event)

Persist a critical event to the WAL before emission. Called synchronously on the emit path; a failure is logged but does not block the emit (best-effort durability).

Source

fn ack(&self, id: &str)

Mark an event as delivered (acked). Called by the webhook deliverer after the event has been dispatched to matching targets.

Source

fn unacked(&self) -> Vec<Event>

Load all un-acked events from the WAL, ordered oldest-first. Called on startup to replay events that were not delivered before the previous process exited.

Implementors§