code: def declare_exchange(channel, name, type, options = {})
        exchange =
          # Check if default options need to be supplied to a non-default delcaration
          if default_exchange?(name)
            channel.default_exchange
          else
            channel.send(type, name, options)
          end
  
        log.debug("Exchange #{exchange.name.inspect} declared")
  
        exchange
      end
docs: Declare an exchange on the specified channel.
  
   @param channel [AMQP::Channel]
   @param name [String]
   @param type [String]
   @param options [Hash]
   @return [AMQP::Exchange]
   @api public