def amqp_send(kind, target, packet, received_at, &callback)
      begin
        @pending_requests[packet.token] = PendingRequest.new(kind, received_at, callback) if callback
        if packet.class == Request
          amqp_send_retry(packet, packet.token)
        else
          amqp_send_once(packet)
        end
      rescue TemporarilyOffline => e
        if queueing?
          # Queue request until come back online
          @offline_handler.queue_request(kind, packet.type, packet.payload, target, packet.token, packet.expires_at, packet.skewed_by, &callback)
          @pending_requests.delete(packet.token) if callback
        else
          # Send retry response so that requester, e.g., RetryableRequest, can retry
          result = OperationResult.retry("lost RightNet connectivity")
          handle_response(Result.new(packet.token, @identity, result, @identity))
        end
      rescue SendFailure => e
        # Send non-delivery response so that requester, e.g., RetryableRequest, can retry
        result = OperationResult.non_delivery("send failed unexpectedly")
        handle_response(Result.new(packet.token, @identity, result, @identity))
      end
      true
    end
def amqp_send(kind, target, packet, received_at, &callback)
      begin
        @pending_requests[packet.token] = PendingRequest.new(kind, received_at, callback) if callback
        if packet.class == Request
          amqp_send_retry(packet, packet.token)
        else
          amqp_send_once(packet)
        end
      rescue TemporarilyOffline => e
        if queueing?
          # Queue request until come back online
          @offline_handler.queue_request(kind, packet.type, packet.payload, target, packet.token, packet.expires_at, packet.skewed_by, &callback)
          @pending_requests.delete(packet.token) if callback
        else
          # Send retry response so that requester, e.g., RetryableRequest, can retry
          result = OperationResult.retry("lost RightNet connectivity")
          handle_response(Result.new(packet.token, @identity, result, @identity))
        end
      rescue SendFailure => e
        # Send non-delivery response so that requester, e.g., RetryableRequest, can retry
        result = OperationResult.non_delivery("send failed unexpectedly")
        handle_response(Result.new(packet.token, @identity, result, @identity))
      end
      true
    end
Send request via AMQP
 If lack connectivity and queueing enabled, queue request

 === Parameters
 kind(Symbol):: Kind of request: :send_push or :send_request
 target(Hash|NilClass):: Target for request
 packet(Push|Request):: Request packet to send
 received_at(Time):: Time when request received

 === Block
 Optional block used to process response asynchronously with the following parameter:
   result(Result):: Response with an OperationResult of SUCCESS, RETRY, NON_DELIVERY, or ERROR

 === Return
 true:: Always return true