A queue may replay a job after failure. With BullMQ, design idempotent jobs and use stable identifiers to spot duplicate jobs. A daily report's business key can combine account, closed reporting period, report type and destination. Keep the outbound outcome in a durable record. A queue ID deduplicates while a job with that ID still exists. Idempotent jobs · Job IDs
Step by step
Define the job key
Use a BullMQ test queue and a simulated channel. Form a stable key from account, completed day, report type and destination. Persist it in the dispatch record.
const key = 'acct42-2026-11-19-daily-qa';
await queue.add('report', { key }, { jobId: key });
What to check · Repeated requests identify the same delivery. The jobId contains no colon.
If it goes wrong
Normalize identifiers if the key changes between attempts. Use the durable record when the old job has been removed.
Limit retries to safe work
Introduce a temporary error in data collection and give that job bounded retries with backoff. Have the send step consult the durable record.
{ attempts: 3, backoff: { type: 'exponential', delay: 1000 } }
What to check · Collection retries after increasing delays. The delivery still maps to one key.
If it goes wrong
Fix credentials or source permissions for permanent access errors. Additional send attempts will not restore access.
Simulate an accepted send that loses its response
Have the simulator accept the message and drop the response. Mark the outcome unknown and check the channel’s records before trying to send it again.
Test case: acct42-2026-11-19-daily-qa → simulator accepts → worker times out
What to check · Reconciliation finds the original send ID and the channel records a single message.
If it goes wrong
If the channel cannot provably confirm the attempt, send the case for review and keep the status unknown.
Put the NoBreakAds MCP to work
Before retrying, use NoBreakAds MCP in a supported client to check the automation history. Match run ID, recipient and period to the queue record. If history shows acceptance or leaves the state unclear, check the receipt first. Explore WhatsApp reports · Create an account.
Related guide: WhatsApp message preview or real send? How to tell what the agent did
Decide which step can safely repeat
Retry a temporary read failure with a limit and backoff. If the provider may have received the message and the response was lost, mark the outcome unknown and reconcile the old attempt before sending again. Simulate a lost response using an internal test channel. The same business key should yield a single message. Retrying with backoff
Illustrative scenario
Suppose the queue worker stops just after the provider accepts the report. The team finds the original attempt in the send log and avoids posting a second message to the group.
Frequently asked questions
Does a custom queue ID handle all duplication?
It helps while the job exists. Persist the business key and outbound state beyond the queue's retention window when needed.
How long should retry backoff be?
Use provider limits and the report's useful delivery window. Stop retrying when late delivery is no longer appropriate.
How do I test the protection after the old job is removed?
In testing, finish mock send R17 and keep its receipt in the durable record. After the test job leaves the queue, enqueue another task with the same business key. It should find the receipt without sending again. If it duplicates the message, check the record lookup before the send.