// HTTP4K PRO

Reliable, distributed transaction processing

Build reliable, distributed transaction processing systems using the http4k Transactional Outbox pattern

Highlights

Async
processing

Process HTTP requests asynchronously using the Transactional Outbox pattern - store-and-forward with database-backed reliability.

Built with
testing in mind

The same level of testability as the rest of your http4k application, with in-memory implementations and plain HttpHandler composition.

Handle inbound
and outbound requests

Use the same mechanism for outgoing messages (outbox) or incoming work (inbox) - swap your client or handler for a PostboxHandlers interceptor.

Out-of-the-box
resilience

Database transactions, retries with incremental backoff, and a claim-lease model so concurrent processors never double-handle work.

Getting started with the Postbox module in http4k

Step 1 - To implement a Transactional Outbox, replace your HTTP client or handler with a PostboxHandlers interceptor. Requests are stored transactionally and returned as 202 Accepted.

Step 2 - Create the storage with JdbcPostboxSchema.create(datasource) and wrap it in a PostboxTransactor for transactional processing.

Step 3 - Run PostboxProcessing in the background to claim pending requests, process them with your HttpHandler, and store the responses.

Step 4 - Serve the stored responses with the Postbox status handler - consume them immediately or later, with idempotent retries.

// PRICING

Pricing

http4k Postbox is available under the http4k Commercial License. Free for qualifying small businesses (under $1M ARR), non-commercial, non-profit, and research use. Checkout is handled securely by Stripe.

All http4k Pro modules are also automatically included with the Enterprise Edition. Need bulk seats, team licensing, or custom terms? Get in touch.

pumb
scarf