def connection_status(options = {}, &callback)
      id = generate_id
      @connection_status[id] = {:boundary => options[:boundary], :brokers => options[:brokers], :callback => callback}
      if timeout = options[:one_off]
        @connection_status[id][:timer] = EM::Timer.new(timeout) do
          if @connection_status[id]
            if @connection_status[id][:callback].arity == 2
              @connection_status[id][:callback].call(:timeout, nil)
            else
              @connection_status[id][:callback].call(:timeout)
            end
            @connection_status.delete(id)
          end
        end
      end
      id
    end
def connection_status(options = {}, &callback)
      id = generate_id
      @connection_status[id] = {:boundary => options[:boundary], :brokers => options[:brokers], :callback => callback}
      if timeout = options[:one_off]
        @connection_status[id][:timer] = EM::Timer.new(timeout) do
          if @connection_status[id]
            if @connection_status[id][:callback].arity == 2
              @connection_status[id][:callback].call(:timeout, nil)
            else
              @connection_status[id][:callback].call(:timeout)
            end
            @connection_status.delete(id)
          end
        end
      end
      id
    end
Register callback to be activated when there is a change in connection status
 Can be called more than once without affecting previous callbacks

 === Parameters
 options(Hash):: Connection status monitoring options
   :one_off(Integer):: Seconds to wait for status change; only send update once;
     if timeout, report :timeout as the status
   :boundary(Symbol):: :any if only report change on any (0/1) boundary,
     :all if only report change on all (n-1/n) boundary, defaults to :any
   :brokers(Array):: Only report a status change for these identified brokers

 === Block
 Required block activated when connected count crosses a status boundary with following parameters
   status(Symbol):: Status of connection: :connected, :disconnected, or :failed, with
     :failed indicating that all selected brokers or all brokers have failed

 === Return
 id(String):: Identifier associated with connection status request