Skip to content

Integration recipes: HTTP triggering and exactly-once event receivers - #151

Merged
SamuelXing merged 1 commit into
mainfrom
docs/integration-recipes
Aug 4, 2026
Merged

Integration recipes: HTTP triggering and exactly-once event receivers#151
SamuelXing merged 1 commit into
mainfrom
docs/integration-recipes

Conversation

@SamuelXing

Copy link
Copy Markdown
Owner

Closes #140. Closes #139.

Both integration asks reduce to the same durare primitive — the workflow id is the idempotency key — so rather than shipping adapter crates before the 1.0 API freeze, this PR gives each its minimal honest form:

Dedicated integration crates (an axum extractor, broker receivers à la TypeScript's per-ORM/broker packages) stay deliberately post-1.0: they'd be built against an API that hasn't frozen, and TS ships them as separate packages for exactly this reason. These recipes capture the operative content of both issues today.

Verified: example compiles clean under --features admin; strict doc build clean; doctests green.

The two integration asks (HTTP frameworks, event-source receivers) both
reduce to the same primitive — the workflow id is the idempotency key —
so before any adapter crate exists, each gets its minimal honest form:

- examples/http_trigger.rs: an axum handler that turns the
  dbos-idempotency-key header into the workflow id. Retried POSTs attach
  to the same run; /charges shows the count staying at 1. Requires the
  admin feature only because that is what pulls axum into this crate's
  graph — applications depend on axum directly.

- messaging guide, new Event-source receivers section: consume from any
  at-least-once source, derive the id from the message coordinates
  (topic-partition-offset), start, then ack. The workflow row is durable
  before the source's ack, so redelivery lands on the existing run —
  at-least-once delivery + idempotent start = exactly-once execution.

Dedicated integration crates (axum extractors, Kafka receivers) remain
deliberately post-1.0, once the core API freezes.
@SamuelXing
SamuelXing merged commit 9300104 into main Aug 4, 2026
5 checks passed
SamuelXing added a commit that referenced this pull request Aug 4, 2026
CHANGELOG only: the role-authorization Added entry alongside the
integration-recipes Documentation entries from #151.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant