https://github.com/edenhill/librdkafka/issues/1660 git
RT,公司的kafka更換了版本, 用到librdkafka的場景就開始報這條警告github
解決方式以下:api
在初始化的時候,修改相關配置ide
const char* api_version_request = "false"; const char* api_version_fallback = "0.8.2.0"; if (rd_kafka_conf_set(g_rkconf, "api.version.request", api_version_request, errstr, sizeof(errstr)) != RD_KAFKA_CONF_OK) { fprintf(stderr, "%s\n", errstr); exit(0); } if (rd_kafka_conf_set(g_rkconf, "broker.version.fallback", api_version_fallback, errstr, sizeof(errstr)) != RD_KAFKA_CONF_OK) { fprintf(stderr, "%s\n", errstr); exit(0); }