src/rdkafka.c
int rd_kafka_simple_consumer_add (rd_kafka_t *rk) {
        if (rd_atomic32_get(&rk->rk_simple_cnt) < 0)
                return 0;

        return (int)rd_atomic32_add(&rk->rk_simple_cnt, 1);
}
/**
 * Counts usage of the legacy/simple consumer (rd_kafka_consume_start() with
 * friends) since it does not have an API for stopping the cgrp we will need to
 * sort that out automatically in the background when all consumption
 * has stopped.
 *
 * Returns 0 if a  High level consumer is already instantiated
 * which means a Simple consumer cannot co-operate with it, else 1.
 *
 * A rd_kafka_t handle can never migrate from simple to high-level, or
 * vice versa, so we dont need a ..consumer_del().
 */
Counts usage of the legacy/simple consumer (rd_kafka_consume_start() with
friends) since it does not have an API for stopping the cgrp we will need to
sort that out automatically in the background when all consumption
has stopped.

Returns 0 if a  High level consumer is already instantiated
which means a Simple consumer cannot co-operate with it, else 1.

A rd_kafka_t handle can never migrate from simple to high-level, or
vice versa, so we dont need a ..consumer_del().
Counts usage of the legacy / simple consumer ( rd_kafka_consume_start () with friends ) since it does not have an API for stopping the cgrp we will need to sort that out automatically in the background when all consumption has stopped . Returns 0 if a High level consumer is already instantiated which means a Simple consumer cannot co - operate with it else 1 . A rd_kafka_t handle can never migrate from simple to high - level or vice versa so we dont need a .. consumer_del () .
int rd_kafka_simple_consumer_add (rd_kafka_t *rk) {
        if (rd_atomic32_get(&rk->rk_simple_cnt) < 0)
                return 0;
        return (int)rd_atomic32_add(&rk->rk_simple_cnt, 1);
}
int rd_kafka_simple_consumer_add ( rd_kafka_t * rk ) { if ( rd_atomic32_get ( & rk -> rk_simple_cnt ) < 0 ) return 0 ; return ( int ) rd_atomic32_add ( & rk -> rk_simple_cnt , 1 ) ; }
Counts usage of the legacy/simple consumer (rd_kafka_consume_start() with
 friends) since it does not have an API for stopping the cgrp we will need to
 sort that out automatically in the background when all consumption
 has stopped.
Counts usage of the legacy / simple consumer ( rd_kafka_consume_start () with friends ) since it does not have an API for stopping the cgrp we will need to sort that out automatically in the background when all consumption has stopped .