Integration recipes: HTTP triggering and exactly-once event receivers - #151
Merged
Conversation
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
examples/http_trigger.rs([Parity] HTTP framework integration for triggering workflows (axum/actix handlers + idempotency-key extraction) #140): a runnable axum server whose handler extracts the cross-SDKdbos-idempotency-keyheader and makes it the workflow id — retried requests attach to the same run, demonstrated by a charge counter that stays at 1 under repeatedcurl. The example needs theadminfeature only because that's what pulls axum into this crate's dependency graph; real applications depend on axum directly, and the same two lines work in any framework.messagingguide — new "Event-source receivers" section ([Parity] Event-source receivers (Kafka / SQS / S3 / Postgres LISTEN) that start a workflow exactly-once per message #139): the exactly-once consumption pattern for Kafka/SQS/LISTEN-class sources — derive the id from the message coordinates, start the workflow, ack only after the start persisted. At-least-once delivery + idempotent start composes to exactly-once workflow execution; the crash-ordering argument is spelled out.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.