def recv(self, request_id):
        """
        Get a response packet from Kafka

        Arguments:
            request_id: can be any int (only used for debug logging...)

        Returns:
            str: Encoded kafka packet response from server
        """
        log.debug("Reading response %d from Kafka" % request_id)

        # Make sure we have a connection
        if not self._sock:
            self.reinit()

        # Read the size off of the header
        resp = self._read_bytes(4)
        (size,) = struct.unpack('>i', resp)

        # Read the remainder of the response
        resp = self._read_bytes(size)
        return resp
def recv ( self , request_id ) : log . debug ( "Reading response %d from Kafka" % request_id ) if not self . _sock : self . reinit ( ) resp = self . _read_bytes ( 4 ) ( size , ) = struct . unpack ( '>i' , resp ) resp = self . _read_bytes ( size ) return resp
Get a response packet from Kafka

        Arguments:
            request_id: can be any int (only used for debug logging...)

        Returns:
            str: Encoded kafka packet response from server