def _sendRequest(self, tReq):
        """Send a single request over our protocol to the Kafka broker."""
        try:
            tReq.sent = True
            self.proto.sendString(tReq.data)
        except Exception as e:
            log.exception('%r: Failed to send request %r', self, tReq)
            del self.requests[tReq.id]
            tReq.d.errback(e)
        else:
            if not tReq.expect:
                # Once we've sent a request for which we don't expect a reply,
                # we're done, remove it from requests, and fire the deferred
                # with 'None', since there is no reply to be expected
                del self.requests[tReq.id]
                tReq.d.callback(None)
def _sendRequest ( self , tReq ) : try : tReq . sent = True self . proto . sendString ( tReq . data ) except Exception as e : log . exception ( '%r: Failed to send request %r' , self , tReq ) del self . requests [ tReq . id ] tReq . d . errback ( e ) else : if not tReq . expect : del self . requests [ tReq . id ] tReq . d . callback ( None )
Send a single request over our protocol to the Kafka broker.