title: Singleton for sidekiq threads possible?
body: <p>So I need to be able to create a single RabbitMQ connection and channel per Sidekiq thread because I run out of RabbitMQ connections if I don't and because the <a href="http://rubybunny.info/articles/connecting.html#opening_a_channel" rel="nofollow">docs</a> suggest it. The docs show how to do it with <a href="http://rubybunny.info/articles/connecting.html#using_bunny_with_unicorn" rel="nofollow">Unicorn</a>:</p>
  
  <pre><code>before_fork do |server, worker|
    $rabbitmq_connection.close if $rabbitmq_connection
  end
  
  after_fork do |server, worker|
    # the following is *required* for Rails + "preload_app true",
    defined?(ActiveRecord::Base) and
      ActiveRecord::Base.establish_connection
  
      $rabbitmq_connection = Bunny.new
      $rabbitmq_connection.start
  
      $rabbitmq_channel    = $rabbitmq_connection.create_channel
    end
  end
  </code></pre>
  
  <p>Is it possible to do something similar for Sidekiq threads? Is there something I can do in <code>Sidekiq.server_configure</code>? It looks like <a href="https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/manager.rb#L71" rel="nofollow">this</a> is where Sidekiq starts a thread but I don't see anyway to hook into the start/stop?</p>