03 2022 档案

摘要:互斥锁声明 typedef struct { union { CRITICAL_SECTION cs; /* Critical section handle (used for non-timed mutexes) */ HANDLE mut; /* Mutex handle (used for t 阅读全文
posted @ 2022-03-25 18:36 Aemnprsu_wx 阅读(142) 评论(0) 推荐(0)
摘要:1.安装librdkafka github下载源代码 编译 参考example写测试代码 example只带文件可直接执行 写好后运行 echo "/usr/local/lib" >> /etc/ld.so.conf ldconfig 编译语句示例 gcc test_consumer.c -o te 阅读全文
posted @ 2022-03-22 17:15 Aemnprsu_wx 阅读(511) 评论(0) 推荐(0)
摘要:/*结构体说明 rd_kafka_toppar_s:topic & partition combination rd_kafka_topic: rd_kafka_q_s rd_kafka_q_t:队列操作 */ else if (mode == 'C') { /* * Consumer */ //初 阅读全文
posted @ 2022-03-21 15:24 Aemnprsu_wx 阅读(227) 评论(0) 推荐(0)
摘要:消息体定义:(消费者消息) 包含topic,partition,value(*key),消息长度,offset typedef struct rd_kafka_message_s { rd_kafka_resp_err_t err; /**< Non-zero for error signaling 阅读全文
posted @ 2022-03-17 15:26 Aemnprsu_wx 阅读(413) 评论(0) 推荐(0)