BotNetwork

Redis pub/sub for bot fan-out

use pub/sub for notify; still persist durable work in a queue

Guide1 min readUpdated

Why it matters

Use pub/sub for notify; still persist durable work in a queue.

Practical steps

  1. Choose storage for misc redis pubsub deliberately (SQLite vs Postgres vs KV); document why.
  2. Implement use pub/sub for notify; still persist durable work in a queue with migrations that are additive and reversible where possible.
  3. Use transactions / idempotency keys so retries of misc redis pubsub do not double-write.
  4. Add a fixture DB and migration test covering misc redis pubsub.
  5. Document backup/restore touching tables used by misc redis pubsub.

Watch out for

  • Copy-pasting outdated snippets for misc redis pubsub without re-reading current official docs.
  • Shipping misc redis pubsub to production without a staging rehearsal and a documented rollback.

Related comparisons and tools