{"id":64958,"date":"2025-05-03T08:24:44","date_gmt":"2025-05-03T00:24:44","guid":{"rendered":"https:\/\/fwq.ai\/blog\/64958\/"},"modified":"2025-05-03T08:24:44","modified_gmt":"2025-05-03T00:24:44","slug":"kafka-%e7%9a%84-kafka-%e5%92%8c-kafka-clients-%e4%be%9d%e8%b5%96%e9%a1%b9%e6%9c%89%e4%bb%80%e4%b9%88%e5%8c%ba%e5%88%ab%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/64958\/","title":{"rendered":"Kafka \u7684 \u201ckafka\u201d \u548c \u201ckafka-clients\u201d \u4f9d\u8d56\u9879\u6709\u4ec0\u4e48\u533a\u522b\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173096532468675.jpg\" class=\"aligncenter\" title=\"Kafka \u7684 \u201ckafka\u201d \u548c \u201ckafka-clients\u201d \u4f9d\u8d56\u9879\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u63d2\u56fe\" alt=\"Kafka \u7684 \u201ckafka\u201d \u548c \u201ckafka-clients\u201d \u4f9d\u8d56\u9879\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>Kafka \u670d\u52a1\u7aef\u4e0e\u5ba2\u6237\u7aef\u4f9d\u8d56\u4e4b\u95f4\u7684<\/strong><\/p>\n<p>\u5982\u56fe\u6240\u793a\uff0c\u6709\u4e24\u79cd\u4e0d\u540c\u7684 Kafka \u4f9d\u8d56\u9879\uff1a\u201ckafka\u201d\u548c\u201ckafka-clients\u201d\u3002\u5b83\u4eec\u4e4b\u95f4\u7684\u533a\u522b\u5728\u4e8e\uff1a<\/p>\n<ul>\n<li> <strong>org..kafka:kafka<\/strong> \u662f Kafka \u670d\u52a1\u7aef\u7684\u4ee3\u7801\uff0c\u7528\u4e8e\u8fd0\u884c Kafka \u96c6\u7fa4\uff0c\u5305\u62ec broker\u3001\u4e3b\u9898\u548c\u751f\u4ea7\u8005\u3002<\/li>\n<li> <strong>org.apache.kafka:kafka-clients<\/strong> \u662f Kafka \u5ba2\u6237\u7aef\u7684\u4ee3\u7801\uff0c\u7528\u4e8e\u4e0e Kafka \u96c6\u7fa4\u8fdb\u884c\u4ea4\u4e92\uff0c\u5305\u62ec\u751f\u4ea7\u6570\u636e\u3001\u6d88\u8d39\u6570\u636e\u548c\u7ba1\u7406\u5143\u6570\u636e\u3002<\/li>\n<\/ul>\n<p>\u4f5c\u4e3a\u6d88\u8d39\u8005\uff0c\u4f60\u5e94\u8be5\u4f7f\u7528 <strong>org.apache.kafka:kafka-clients<\/strong> \u4f9d\u8d56\u9879\u3002\u6b64\u4f9d\u8d56\u9879\u63d0\u4f9b\u4e86\u7528\u6765\u4e0e Kafka \u96c6\u7fa4\u8fdb\u884c\u4ea4\u4e92\u6240\u9700\u7684\u7c7b\uff0c\u4f8b\u5982 KafkaProducer \u548c KafkaConsumer\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fKafka \u7684 \u201ckafka\u201d \u548c \u201ckafka-clients\u201d \u4f9d\u8d56\u9879\u6709\u4ec0\u4e48\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8IDCBABY\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kafka \u670d\u52a1\u7aef\u4e0e\u5ba2\u6237\u7aef\u4f9d\u8d56\u4e4b\u95f4\u7684 \u5982\u56fe\u6240\u793a\uff0c\u6709\u4e24\u79cd\u4e0d\u540c\u7684 Kafka \u4f9d\u8d56\u9879\uff1a\u201ckafka\u201d\u548c\u201ckafka-clients\u201d\u3002\u5b83\u4eec\u4e4b\u95f4\u7684\u533a\u522b\u5728\u4e8e\uff1a org..kafka:kafka \u662f Kafka \u670d\u52a1\u7aef\u7684\u4ee3\u7801\uff0c\u7528\u4e8e\u8fd0\u884c Kafka \u96c6\u7fa4\uff0c\u5305\u62ec broker\u3001\u4e3b\u9898\u548c\u751f\u4ea7\u8005\u3002 org.apache.kafka:kafka-clients \u662f Kafka \u5ba2\u6237\u7aef\u7684\u4ee3\u7801\uff0c\u7528\u4e8e\u4e0e Kafka \u96c6\u7fa4\u8fdb\u884c\u4ea4\u4e92\uff0c\u5305\u62ec\u751f\u4ea7\u6570\u636e\u3001\u6d88\u8d39\u6570\u636e\u548c\u7ba1\u7406\u5143\u6570\u636e\u3002 \u4f5c\u4e3a\u6d88\u8d39\u8005\uff0c\u4f60\u5e94\u8be5\u4f7f\u7528 org.apache.kafka:kafka-clients \u4f9d\u8d56\u9879\u3002\u6b64\u4f9d\u8d56\u9879\u63d0\u4f9b\u4e86\u7528\u6765\u4e0e Kafka \u96c6\u7fa4\u8fdb\u884c\u4ea4\u4e92\u6240\u9700\u7684\u7c7b\uff0c\u4f8b\u5982 KafkaProducer \u548c KafkaConsumer\u3002 \u4ee5\u4e0a\u5c31\u662fKafka \u7684 \u201ckafka\u201d \u548c \u201ckafka-clients\u201d \u4f9d\u8d56\u9879\u6709\u4ec0\u4e48\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8IDCBABY\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-64958","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/64958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=64958"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/64958\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=64958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=64958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=64958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}