Book 4 · Lesson 4.7
Consumer writes to Postgres
- Trace persist_event after Kafka recv
- Verify rows with psql
- Call GET /api/metrics/summary
Prerequisites: 4.6
curl POST
:8081/webhooks/hello → ingestionKafka
raw-dev-events (ingestion) → enriched-dev-events (llm Stage 3)Consumer
analyzer run_consumer recv()Postgres
INSERT team_events ON CONFLICT DO UPDATEQuery
GET :8082/api/metrics/summaryLab commands
cargo run -p millipede-analyzer # terminal 1
cargo run -p millipede-ingestion # terminal 2
curl -X POST http://localhost:8081/webhooks/hello \
-H 'Content-Type: application/json' \
-d '{"action":"opened","source":"github"}'
psql postgres://millipede:millipede@localhost:5432/team_radar \
-c "SELECT id, source FROM team_events ORDER BY created_at DESC LIMIT 3;"
Teach-back prompt
At which step is the HTTP client done waiting?
Webhook to Postgres
Lab complete — nice work.