Chimeway.Dispatch.Sync (chimeway v1.0.0)

Copy Markdown View Source

Synchronous dispatcher — runs the full delivery pipeline in the calling process.

Pipeline per delivery:

  1. Terminal state guard — skip if already succeeded/suppressed/cancelled.
  2. Transition delivery to :dispatched (must succeed before adapter is called).
  3. Resolve adapter module from config.
  4. Call adapter.deliver/2.
  5. Classify outcome (dispatcher responsibility, not adapter's).
  6. Record attempt + transition to final status atomically.

Swap to Chimeway.Dispatch.Oban in Phase 3 via config:

config :chimeway, :dispatcher, Chimeway.Dispatch.Oban