What are Sidekiq queues and how do you use them?

Beginner

Answer

Queues organize jobs by priority or type. Workers can be assigned to specific queues:

class CriticalWorker
  include Sidekiq::Worker
  sidekiq_options queue: 'critical'
  
  def perform(data)
    # Process critical job
  end
end

# Start worker with queue priorities
# bundle exec sidekiq -q critical,2 -q default,1

The number after queue name indicates weight (higher = more priority). Critical queue gets checked twice as often as default.