def send_request_to_resource(message)
      routing_key = path_to_routing_key(message['path'])
      if block_given?
        EventMachine.defer do
          yield send_request_to_resource(message)
        end
      else
        send_HTTP_request(@resources_exchange, routing_key, message)
      end
    end
def send_request_to_resource(message)
      routing_key = path_to_routing_key(message['path'])
      if block_given?
        EventMachine.defer do
          yield send_request_to_resource(message)
        end
      else
        send_HTTP_request(@resources_exchange, routing_key, message)
      end
    end
send a message to a resource

 *message*:: HTTP formatted message to be sent, must contain `'path'` key with URL path

 This method can optionally take a block which will be executed asynchronously and yielded the response