Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Deduplication

A dedup key sets what happens when the key is already queued:

-- skip the insert
job1 = Arb.defaultJob payload & Arb.setDedupKey (Just $ IgnoreDuplicate "order-123")

-- replace the queued job
job2 = Arb.defaultJob payload & Arb.setDedupKey (Just $ ReplaceDuplicate "order-123")

Keys are scoped to one queue. A job in the DLQ or the archive is not a duplicate.

ReplaceDuplicate copies payload, priority, group key, attempt limit, admission keys, and retention from the new job. It clears the attempt count, last error, and claim.

A replacement is refused when the queued job is in flight, has a force-cancel flag, has a different parent, or has children in the queue or DLQ. The queued job is unchanged.

OutcomeinsertJob returns
InsertedJust the new job
ReplacedJust the updated job
Skipped by IgnoreDuplicateNothing
Replacement refusedNothing

Key type: Arbiter.Core.Job.Dedup Haddocks.