Sidekiq middleware

Duplicate jobs, prevented.

sidekiq-unique-jobs stops the same job from being enqueued twice or run concurrently. Pick a lock type, pick what happens on a conflict, and let Redis keep your jobs unique.

Gemfile
gem "sidekiq-unique-jobs", "~> 9.0"
Five lock types

From debouncing enqueues to serializing execution — choose the lock that matches the guarantee you need.

Conflict strategies

Log, raise, reject, replace, or reschedule when a duplicate shows up. Different rules for enqueue and execute.

Two Redis keys per lock

v9 is a ground-up rewrite: a LOCKED hash and a global digests sorted set. Less memory, fewer moving parts.

Orphan recovery

A reaper cleans up locks left behind by crashed processes, so a hard kill never wedges a digest forever.

Observable

Reflection hooks fire on every lock event — wire them into your metrics and logs without patching the gem.

Web UI

A Locks tab in the Sidekiq Web UI to browse, filter, and delete locks when you need to see what's held.