src/rdkafka_broker.c
static int rd_kafka_broker_buf_enq2 (rd_kafka_broker_t *rkb,
                                     rd_kafka_buf_t *rkbuf) {
        if (unlikely(rkb->rkb_source == RD_KAFKA_INTERNAL)) {
                /* Fail request immediately if this is the internal broker. */
                rd_kafka_buf_callback(rkb->rkb_rk, rkb,
                                      RD_KAFKA_RESP_ERR__TRANSPORT,
                                      NULL, rkbuf);
                return -1;
        }

        rd_kafka_broker_buf_enq0(rkb, rkbuf);

        return 0;
}
/**
 * Enqueue buffer on broker's xmit queue, but fail buffer immediately
 * if broker is not up.
 *
 * Locality: broker thread
 */
Enqueue buffer on broker's xmit queue, but fail buffer immediately
if broker is not up.

broker thread
Enqueue buffer on broker ' s xmit queue but fail buffer immediately if broker is not up . broker thread
static int rd_kafka_broker_buf_enq2 (rd_kafka_broker_t *rkb,
                                     rd_kafka_buf_t *rkbuf) {
        if (unlikely(rkb->rkb_source == RD_KAFKA_INTERNAL)) {
                rd_kafka_buf_callback(rkb->rkb_rk, rkb,
                                      RD_KAFKA_RESP_ERR__TRANSPORT,
                                      NULL, rkbuf);
                return -1;
        }
        rd_kafka_broker_buf_enq0(rkb, rkbuf);
        return 0;
}
static int rd_kafka_broker_buf_enq2 ( rd_kafka_broker_t * rkb , rd_kafka_buf_t * rkbuf ) { if ( unlikely ( rkb -> rkb_source == RD_KAFKA_INTERNAL ) ) { rd_kafka_buf_callback ( rkb -> rkb_rk , rkb , RD_KAFKA_RESP_ERR__TRANSPORT , NULL , rkbuf ) ; return -1 ; } rd_kafka_broker_buf_enq0 ( rkb , rkbuf ) ; return 0 ; }
Enqueue buffer on broker's xmit queue, but fail buffer immediately
 if broker is not up.
Enqueue buffer on broker ' s xmit queue but fail buffer immediately if broker is not up .
/* Fail request immediately if this is the internal broker. */