Dev.to
7/9/2026

Batch PDF Verification at Scale: Async Queue Patterns for the HTPBE API
Short summary
A technical guide to wrapping a synchronous PDF tamper-detection API in an async job queue for batch processing at scale. Covers building a BullMQ/Redis-based pipeline with bounded worker concurrency, idempotent job IDs, retry with backoff for 429 responses, and a verdict router for downstream routing. The key architectural point is that the API itself is blocking (2-15s per call), so all async infrastructure — queue, workers, retries — lives on the client side.
- •Synchronous API calls (2-15s each) must be wrapped in your own async queue for batch processing
- •BullMQ + Redis provides bounded concurrency, retry with backoff, and idempotent job IDs
- •Verdict router sends results to auto-accept, auto-reject, or human review lanes
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



