src/rdkafka.c
static void rd_kafka_metadata_refresh_cb (rd_kafka_timers_t *rkts, void *arg) {
        rd_kafka_t *rk = rkts->rkts_rk;
        int sparse = 1;

        /* Dont do sparse requests if there is a consumer group with an
         * active subscription since subscriptions need to be able to match
         * on all topics. */
        if (rk->rk_type == RD_KAFKA_CONSUMER && rk->rk_cgrp &&
            rk->rk_cgrp->rkcg_flags & RD_KAFKA_CGRP_F_WILDCARD_SUBSCRIPTION)
                sparse = 0;

        if (sparse)
                rd_kafka_metadata_refresh_known_topics(
                        rk, NULL, 1/*force*/, "periodic refresh");
        else
                rd_kafka_metadata_refresh_all(rk, NULL, "periodic refresh");
}
/**
 * @brief Periodic metadata refresh callback
 *
 * @locality rdkafka main thread
 */
@brief Periodic metadata refresh callback
@locality rdkafka main thread
@brief Periodic metadata refresh callback @locality rdkafka main thread
static void rd_kafka_metadata_refresh_cb (rd_kafka_timers_t *rkts, void *arg) {
        rd_kafka_t *rk = rkts->rkts_rk;
        int sparse = 1;
        if (rk->rk_type == RD_KAFKA_CONSUMER && rk->rk_cgrp &&
            rk->rk_cgrp->rkcg_flags & RD_KAFKA_CGRP_F_WILDCARD_SUBSCRIPTION)
                sparse = 0;
        if (sparse)
                rd_kafka_metadata_refresh_known_topics(
                        rk, NULL, 1, "periodic refresh");
        else
                rd_kafka_metadata_refresh_all(rk, NULL, "periodic refresh");
}
static void rd_kafka_metadata_refresh_cb ( rd_kafka_timers_t * rkts , void * arg ) { rd_kafka_t * rk = rkts -> rkts_rk ; int sparse = 1 ; if ( rk -> rk_type == RD_KAFKA_CONSUMER && rk -> rk_cgrp && rk -> rk_cgrp -> rkcg_flags & RD_KAFKA_CGRP_F_WILDCARD_SUBSCRIPTION ) sparse = 0 ; if ( sparse ) rd_kafka_metadata_refresh_known_topics ( rk , NULL , 1 , " " ) ; else rd_kafka_metadata_refresh_all ( rk , NULL , " " ) ; }
@brief Periodic metadata refresh callback
 @locality rdkafka main thread
@brief Periodic metadata refresh callback @locality rdkafka main thread
/* Dont do sparse requests if there is a consumer group with an
         * active subscription since subscriptions need to be able to match
         * on all topics. */ /*force*/