Open source · IoT & Edge

Offline Queue Simulator

Simulate offline writes, queue limits and replay after reconnection.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

offline-queue-simulator reads one exported, synthetic event timeline and reports what a bounded virtual device queue would deliver, lose, suppress, or leave pending. It does not contact devices, send writes, or replay a real queue. Node.js 22+; no dependencies.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.

Run the checked-in example

node bin/offline-queue-simulator.mjs --root examples --input passing.json
node bin/offline-queue-simulator.mjs --root examples --input failing.json
npm run check

Read the result

The passing example exits 0; the failing reconnect burst exits 1 with queue-overflow. Paths are resolved against the real --root; a symlink out of that root is refused. Invalid CLI options exit 2 with empty stdout. Unreadable, malformed, partial, or unsupported input exits 2 with an incomplete JSON report. Stdout contains only one JSON report.