Allan Simões AdegasPortuguês
Menu
Back to home

Event Lab

Ready to deploy

A synthetic event pipeline with Redis Streams, replay, Prometheus metrics, and MCP queries.

Role
Personal project
Started
2026
Event Lab
Project illustration
Redis Streams
persistent queue with a consumer group
MCP
read-only queries over stdio

Overview

A small pipeline for observing duplicate deliveries, worker interruption, and events running out of retries. The project builds on questions raised in the transaction monitoring case.

The worker processes synthetic scenarios. A read interface provides the event history and metrics used by the MCP server.

What it does

Pending delivery recovery
A worker can reclaim a delivery left pending when another worker stops.
DLQ and replay
The pipeline caps attempts and stores exhausted events. An operator can request replay through the CLI.
Processing metrics
Prometheus scrapes pipeline counters and state to track queues, attempts, and outcomes.

Architecture

Architecture: Event LabCLI → Redis Streams. Redis Streams → Worker. Worker → DLQ. Redis Streams → Read API. Read API → Prometheus. Read API → MCPCLIRedis StreamsWorkerDLQRead APIPrometheusMCP
The worker consumes Redis Streams. The read service exposes data to Prometheus and MCP.

Decisions and trade-offs

ID-based idempotency
The synthetic effect, event state, and ACK live in Redis. The transition is atomic inside that boundary. External side effects would require a separate mechanism.

Quality and operations

  • Tested locally with consumer interruption, abrupt Redis restart, concurrent replay, Prometheus scraping, and MCP queries. The site lab provides a browser simulation.

Status and next steps

  • Publish the source and connect a public dashboard with aggregate metrics from the synthetic environment.

Stack

TypeScriptNode.jsRedis StreamsLuaPrometheusMCPDocker Compose