Docket.Checkpoint.Observer behaviour (docket v0.1.1)

Copy Markdown View Source

Best-effort notification of an already-committed durable checkpoint.

Production observers are configured with checkpoint_observers:. An observer runs only after a backend transaction commits and can never roll durable state back. Delivery runs asynchronously under the Docket instance's task supervisor and may be lost or duplicated, so long-lived consumers must use retained events or an export mechanism.

Summary

Callbacks

Observes an already-committed checkpoint. Failures are isolated and logged.

Callbacks

observe(t, t)

@callback observe(Docket.Checkpoint.t(), Docket.Checkpoint.Context.t()) ::
  :ok | {:error, term()}

Observes an already-committed checkpoint. Failures are isolated and logged.