System-event sink configuration. Attach to HotMeshConfig.events, EscalationClientConfig.events, or ClientConfig.events to receive lifecycle events from the SDK.

The SDK calls publish after each durable transition commits, from the single actor that performed the commit. In a multi-container fleet every container's SDK calls its own publish hook — and only for the work it performed — so exactly one container's publish fires per real event.

const events: EventsConfig = {
publish: (event) => {
// map SystemEvent → your LTEvent shape and hand to NATS/Socket.IO
eventRegistry.publish(mapToLTEvent(event));
},
};
interface EventsConfig {
    publish: ((event: SystemEvent) => void | Promise<void>);
}

Properties

Properties

publish: ((event: SystemEvent) => void | Promise<void>)

Called post-commit by the performing actor. Fire-and-forget — the SDK does not await the return value; a thrown/rejected promise is silently swallowed so the committed call is never failed by a publish error.