lib/isimud/bunny_client.rb
def channel
      if (channel = Thread.current[CHANNEL_KEY]).try(:open?)
        channel
      else
        new_channel = connection.channel
        new_channel.confirm_select
        new_channel.prefetch(Isimud.prefetch_count) if Isimud.prefetch_count
        Thread.current[CHANNEL_KEY] = new_channel
      end
    end
def channel
      if (channel = Thread.current[CHANNEL_KEY]).try(:open?)
        channel
      else
        new_channel = connection.channel
        new_channel.confirm_select
        new_channel.prefetch(Isimud.prefetch_count) if Isimud.prefetch_count
        Thread.current[CHANNEL_KEY] = new_channel
      end
    end
Open a new, thread-specific AMQP connection channel, or return the current channel for this thread if it exists
   and is currently open. New channels are created with publisher confirms enabled. Messages will be prefetched
   according to Isimud.prefetch_count when declared.
 @return [Bunny::Channel] channel instance.