Write an HTTP handler. Let WolveKafka manage Kafka consumption and delivery.
Ask a team to "just consume the orders topic" and see how long it takes.
The first version might be simple: read an order, check inventory, update a database.
Then the inventory API goes down. A malformed order arrives. Your service gets more events than it can handle. Now you need retries, a place for failed records, and a way to slow delivery down.
Every service ends up solving these problems alongside its business logic.
WolveKafka (WKS) moves that delivery work into a separate service. It reads Kafka records and sends them to your application over HTTP. Your handler processes them and reports what happened. WKS handles the next step.
Separate delivery from processing
Dropbox describes a similar boundary in its post about evolving its async platform: delivery gets an event to a handler; execution is where the handler does the work.
WKS applies that idea to Kafka. It manages the Kafka connection, consumer groups, and delivery policies. Your application decides what to do with each event.
The two can change independently. You can update your order-processing code without rewriting a consumer loop. WKS is an independent project; the Dropbox post explains the broader architectural idea.
What your code looks like
Your application exposes one HTTP endpoint. Here's a small Python example. Install Flask with pip install flask, save this as handler.py, and run python handler.py:
from flask import Flask, request import base64 app = Flask(__name__) @app.post("/") def handle(): results = [] for record in request.json["messages"]: order = base64.b64decode(record["value"]) print(order) # your business logic results.append({"status": 2}) # 2 = SUCCESS, 0 = RETRY, 1 = FAILED return {"messages": results} app.run(port=8081) This handler prints each record and reports success. A real handler can return one of three results:
-
SUCCESS(2): processing succeeded. -
RETRY(0): try this record again. -
FAILED(1): apply the configured dead-letter or drop action.
Return one result per record, in the same order. Always include the status: leaving it out means RETRY.
For WKS running on the same host, this configuration points it at a local broker and the handler:
{ "cluster": {"bootstrap_servers": ["localhost:9092"]}, "consumers": [{ "group_id": "orders-handler", "topics": ["orders"], "lambdas": [{"url": "http://localhost:8081/"}] }] } Save it as config.json and start a released Linux binary with wks --config_path config.json. In Docker, replace localhost with addresses the container can reach. For a setup with everything included, use the demo below.
Your application needs no Kafka client or consumer loop. The same HTTP contract works in any language that can serve HTTP.
Three bad days, handled
The inventory API is down. Your handler returns RETRY. WKS waits and tries again according to your retry policy. If retries run out, it applies the dead-letter or drop action you configured. Without either action, it keeps retrying.
An order is malformed. Waiting won't fix it, so your handler returns FAILED. WKS sends the original record to a configured dead-letter topic—a Kafka topic where failed records can be inspected later. Without a dead-letter or drop action, the batch stays uncommitted.
Your service is overloaded. It returns HTTP 429 with Retry-After: 5. The WKS worker waits five seconds before retrying, without using up the records' retry budget. Other workers can still deliver, so configure concurrency to match your service's capacity.
In each case your code reports the outcome, and WKS applies the delivery policy you chose.
Try it locally
You need Git, Docker with Compose v2, Bash, and curl:
git clone https://github.com/wolveflake/wolvekafka.git cd wolvekafka ./demo start --observe ./demo send '{"order_id":"123","event":"order.created"}' ./demo retry # watch a RETRY recover after backoff ./demo dlq # watch a FAILED record land in orders.dlq The demo runs Kafka, WKS, two Python handlers, Prometheus, and Grafana. It uses released WKS v0.2.0; newer features on main require a source build. The first start downloads container images.
Once the demo is running, open Grafana at localhost:3000 to see throughput, retries, and handler latency. Then replace process_order in examples/quickstart/handler.py with your own logic and run ./demo restart-handler.
Run ./demo stop when you're done.
What you still need to decide
WKS removes consumer code from your application, but you still choose topics, access permissions, retry policies, and how many records to process at once. Someone also runs Kafka and WKS and monitors the backlog.
Two delivery rules matter for your handler:
- Records can arrive more than once. Make repeated processing safe—for example, record an order ID together with its database update, and skip an update that's already been applied.
- Parallel processing can change record order. Choose batch mode when you need ordered processing within a partition.
WKS commits Kafka offsets after the batch's outcomes and any required Kafka writes are complete. An unresolved record can therefore hold up other work in its worker. Set failure policies deliberately and monitor progress.
WKS is early-stage software, available as Linux binaries, a container image, and a Helm chart. It's a fit for event processing in a service you deploy yourself. It doesn't provide stateful joins, windows, or exactly-once guarantees. If your existing consumer library already meets your needs, consider whether adding a delivery service is worthwhile.
Where we use it
In Wolveflake's workflow architecture, WKS reads the workflow event log and sends batches to an HTTP dispatcher. The dispatcher loads the event, runs the workflow step, and reports the result. It contains no Kafka consumer code.
If your team already knows what to do with an event, and you'd rather not become Kafka consumer experts to get it, give WKS a try.
Try WolveKafka on GitHub — open source, Apache-2.0. What delivery problem has your team had to solve more than once? Share your use case in an issue or join us on Discord.

