Menu

Recover a lost queue notification with a SQLite outbox
📰

Recover a lost queue notification with a SQLite outbox

DEV Community: backend·Dany Cohen·about 4 hours ago
#UVaSLI1x
#devtobackend#devto#dev#connection#return
Reading 0:00
15s threshold

A worker pops a notification, then stops before committing its work. If the queue is only a dispatch accelerator, recovery must start from a durable record.

This runnable example stores three jobs in SQLite, removes one Spedo notification to simulate a crash, redispatches pending rows, and deliberately adds a duplicate. Four deliveries produce three local effects. The effect and processed-state transition share a single SQLite transaction.

Requirements: Docker, Python 3, a free local port 6380. Save the full example below as transient_idempotent_job_accelerator.py .

docker run --rm -d --name spedo-demo \ -p 127.0.0.1:6380:6380 \ -e SPEDO_ADDR = 0.0.0.0:6380 \ -e SPEDO_REQUIREPASS = demo-local-only \ torxx666/spedo:v0.74.0 SPEDO_HOST = 127.0.0.1 SPEDO_PORT = 6380 SPEDO_PASSWORD = demo-local-only \ python3 transient_idempotent_job_accelerator.py docker stop spedo-demo

Enter fullscreen mode

Exit fullscreen mode

The example was tested against this public image on 9 November 2026.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.