Outbox.SubscriberJob (Outbox v0.1.0-beta.1)

Copy Markdown View Source

Oban worker that runs a single subscriber's handle_event/3 for one outbox event.

The dispatcher enqueues one job per (event, subscriber) pair so each subscriber's failures and retries are isolated.

Args:

  • "event_id" — UUID of the row in outbox_events
  • "subscriber" — the subscriber module name as a string

Return-value mapping (Oban semantics):

  • :ok → job completes
  • {:error, reason} → Oban retries with exponential backoff
  • raised exception → Oban retries with exponential backoff
  • unknown subscriber module → discarded with a clear error
  • outbox event row missing → discarded with a clear error