examples/console_producer.js
function handleProduceResponse(cb, err, res) {
    num_responses += 1;
    if (err) {
        console.log("Error producing message: " + err);
    } else {
        num_messages_acked += 1;
    }

    // We can only indicate were done if stdin was closed and we have no outstanding messages.
    checkSendingComplete(cb);
}
function handleProduceResponse(cb, err, res) {
    num_responses += 1;
    if (err) {
        console.log("Error producing message: " + err);
    } else {
        num_messages_acked += 1;
    }

    // We can only indicate were done if stdin was closed and we have no outstanding messages.
    checkSendingComplete(cb);
}
function handleProduceResponse ( cb , err , res ) { num_responses += 1 ; if ( err ) { console . log ( "Error producing message: " + err ) ; } else { num_messages_acked += 1 ; } // We can only indicate were done if stdin was closed and we have no outstanding messages. checkSendingComplete ( cb ) ; }
Handles produce responses
Handles produce responses