Sometimes, you may want to enqueue a job in reaction to a frequently occurring event, without running that job for every event. For example, you may want to send an email to a user when they update their profile, but you don’t want to send an email for every single update if they make many changes in rapid succession.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/taskforcesh/bullmq/llms.txt
Use this file to discover all available pages before exploring further.
Using Job IDs for Throttling
You can achieve this by setting an identicaljobId so that identical jobs are considered duplicates and not added to the queue.
When you use this option, it is up to you to ensure the jobId is unique for different types of work:
jobId will be ignored while a job with that ID exists in the queue.
Use Cases
Profile Updates
Send a single notification email after profile updates, not for each field change
Search Indexing
Index a document once after multiple rapid edits
Cache Invalidation
Clear cache once for multiple related changes
Webhook Delivery
Send a single webhook for batched events
Alternative: Deduplication
For more sophisticated throttling and deduplication patterns, see the Deduplication guide which provides built-in throttle and debounce modes.Related Resources
Job IDs
Learn more about custom job identifiers
Deduplication
Advanced deduplication strategies
