Use cases
Each page starts from a problem, shows one working solution with mq-bridge, and says where it
stops working. Every page has a runnable example in the repository’s
examples/ directory that CI executes.
| Problem | Solution | Example |
|---|---|---|
| A RAG or semantic-search index drifts from the Postgres rows it was built from | Keep a vector index in sync with Postgres: CDC → embeddings API → Qdrant, with backfill and deletes | postgres-cdc-to-qdrant |
| A service must update its database and publish an event, and the two writes can diverge | Transactional outbox with Postgres and Kafka: relay an outbox table from the WAL | transactional-outbox |
| Tests for Kafka, NATS or RabbitMQ consumers need a running broker or mock the client | Test message handlers without a broker: swap the transport for an in-memory endpoint | test-without-a-broker |
Every page has the same sections: the problem, the solution with a diagram and configuration, a runnable example, failure semantics (restarts, duplicates, deletes, an unavailable sink), when not to use mq-bridge, and a comparison with alternatives.
Related recipes elsewhere in this book: query a stream in DuckDB, Postgres CDC to a file, cross-process IPC.