{"id":2419,"date":"2023-06-29T10:40:25","date_gmt":"2023-06-29T02:40:25","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=2419"},"modified":"2023-06-29T10:40:25","modified_gmt":"2023-06-29T02:40:25","slug":"%e7%a8%8b%e5%ba%8f%e5%91%98%e5%bf%85%e9%a1%bb%e4%ba%86%e8%a7%a3%e7%9a%84%e6%b6%88%e6%81%af%e9%98%9f%e5%88%97%e4%b9%8b%e7%8e%8b-kafka","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/kafka\/%e7%a8%8b%e5%ba%8f%e5%91%98%e5%bf%85%e9%a1%bb%e4%ba%86%e8%a7%a3%e7%9a%84%e6%b6%88%e6%81%af%e9%98%9f%e5%88%97%e4%b9%8b%e7%8e%8b-kafka\/","title":{"rendered":"\u7a0b\u5e8f\u5458\u5fc5\u987b\u4e86\u89e3\u7684\u6d88\u606f\u961f\u5217\u4e4b\u738b-Kafka"},"content":{"rendered":"<div class='wxsyncmain'>\n<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\">\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5927\u5bb6\u597d\uff0c\u6211\u662fJava\u5c0f\u65cb\u98ce\uff01\u4eca\u5929\u7ed9\u5927\u5bb6\u5e26\u6765\u7a0b\u5e8f\u5458\u5fc5\u987b\u4e86\u89e3\u7684\u6d88\u606f\u961f\u5217\u4e4b\u738b-Kafka\u3002<\/h2>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;\"><span style=\"display: inline-block;background: rgb(239, 112, 96);color: rgb(255, 255, 255);padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;\">1. Kafka\u6982\u8ff0<\/span><\/h2>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;\"><span style=\"display: none;\"><\/span>1.1 \u5b9a\u4e49<span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u662f\u7531 Apache \u8f6f\u4ef6\u57fa\u91d1\u4f1a\u5f00\u53d1\u7684\u4e00\u4e2a\u5f00\u6e90\u6d41\u5904\u7406\u5e73\u53f0\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u662f\u4e00\u4e2a<strong>\u5206\u5e03\u5f0f<\/strong>\u7684\u57fa\u4e8e<strong>\u53d1\u5e03\/\u8ba2\u9605\u6a21\u5f0f\u7684\u6d88\u606f\u961f\u5217<\/strong>\uff08Message Queue\uff09\uff0c\u4e3b\u8981\u5e94\u7528\u4e8e\u5927\u6570\u636e\u5b9e\u65f6\u5904\u7406\u9886\u57df\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;\"><span style=\"display: none;\"><\/span>1.2 \u6d88\u606f\u961f\u5217<span style=\"display: none;\"><\/span><\/h3>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>1.2.1 \u4f20\u7edf\u6d88\u606f\u961f\u5217\u7684\u5e94\u7528\u573a\u666f<span style=\"display: none;\"><\/span><\/h4>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.6601851851851852\"  data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154538682.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.6601851851851852\"  data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154538682.png\"><\/noscript><\/figure>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>1.2.2 \u4e3a\u4ec0\u4e48\u9700\u8981\u6d88\u606f\u961f\u5217<span style=\"display: none;\"><\/span><\/h4>\n<ol data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\"><strong style=\"color: black;\">\u89e3\u8026<\/strong>\uff1a\u5141\u8bb8\u4f60\u72ec\u7acb\u7684\u6269\u5c55\u6216\u4fee\u6539\u4e24\u8fb9\u7684\u5904\u7406\u8fc7\u7a0b\uff0c\u53ea\u8981\u786e\u4fdd\u5b83\u4eec\u9075\u5b88\u540c\u6837\u7684\u63a5\u53e3\u7ea6\u675f\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\"><strong style=\"color: black;\">\u5197\u4f59<\/strong>\uff1a\u6d88\u606f\u961f\u5217\u628a\u6570\u636e\u8fdb\u884c\u6301\u4e45\u5316\u76f4\u5230\u5b83\u4eec\u5df2\u7ecf\u88ab\u5b8c\u5168\u5904\u7406\uff0c\u901a\u8fc7\u8fd9\u4e00\u65b9\u5f0f\u89c4\u907f\u4e86\u6570\u636e\u4e22\u5931\u98ce\u9669\u3002\u8bb8\u591a\u6d88\u606f\u961f\u5217\u6240\u91c7\u7528\u7684\"\u63d2\u5165-\u83b7\u53d6-\u5220\u9664\"\u8303\u5f0f\u4e2d\uff0c\u5728\u628a\u4e00\u4e2a\u6d88\u606f\u4ece\u961f\u5217\u4e2d\u5220\u9664\u4e4b\u524d\uff0c\u9700\u8981\u4f60\u7684\u5904\u7406\u7cfb\u7edf\u660e\u786e\u7684\u6307\u51fa\u8be5\u6d88\u606f\u5df2\u7ecf\u88ab\u5904\u7406\u5b8c\u6bd5\uff0c\u4ece\u800c\u786e\u4fdd\u4f60\u7684\u6570\u636e\u88ab\u5b89\u5168\u7684\u4fdd\u5b58\u76f4\u5230\u4f60\u4f7f\u7528\u5b8c\u6bd5\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\"><strong style=\"color: black;\">\u6269\u5c55\u6027<\/strong>\uff1a\u56e0\u4e3a\u6d88\u606f\u961f\u5217\u89e3\u8026\u4e86\u4f60\u7684\u5904\u7406\u8fc7\u7a0b\uff0c\u6240\u4ee5\u589e\u5927\u6d88\u606f\u5165\u961f\u548c\u5904\u7406\u7684\u9891\u7387\u662f\u5f88\u5bb9\u6613\u7684\uff0c\u53ea\u8981\u53e6\u5916\u589e\u52a0\u5904\u7406\u8fc7\u7a0b\u5373\u53ef\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\"><strong style=\"color: black;\">\u7075\u6d3b\u6027 &amp; \u5cf0\u503c\u5904\u7406\u80fd\u529b<\/strong>\uff1a\u5728\u8bbf\u95ee\u91cf\u5267\u589e\u7684\u60c5\u51b5\u4e0b\uff0c\u5e94\u7528\u4ecd\u7136\u9700\u8981\u7ee7\u7eed\u53d1\u6325\u4f5c\u7528\uff0c\u4f46\u662f\u8fd9\u6837\u7684\u7a81\u53d1\u6d41\u91cf\u5e76\u4e0d\u5e38\u89c1\u3002\u5982\u679c\u4e3a\u4ee5\u80fd\u5904\u7406\u8fd9\u7c7b\u5cf0\u503c\u8bbf\u95ee\u4e3a\u6807\u51c6\u6765\u6295\u5165\u8d44\u6e90\u968f\u65f6\u5f85\u547d\u65e0\u7591\u662f\u5de8\u5927\u7684\u6d6a\u8d39\u3002\u4f7f\u7528\u6d88\u606f\u961f\u5217\u80fd\u591f\u4f7f\u5173\u952e\u7ec4\u4ef6\u9876\u4f4f\u7a81\u53d1\u7684\u8bbf\u95ee\u538b\u529b\uff0c\u800c\u4e0d\u4f1a\u56e0\u4e3a\u7a81\u53d1\u7684\u8d85\u8d1f\u8377\u7684\u8bf7\u6c42\u800c\u5b8c\u5168\u5d29\u6e83\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\"><strong style=\"color: black;\">\u53ef\u6062\u590d\u6027<\/strong>\uff1a\u7cfb\u7edf\u7684\u4e00\u90e8\u5206\u7ec4\u4ef6\u5931\u6548\u65f6\uff0c\u4e0d\u4f1a\u5f71\u54cd\u5230\u6574\u4e2a\u7cfb\u7edf\u3002\u6d88\u606f\u961f\u5217\u964d\u4f4e\u4e86\u8fdb\u7a0b\u95f4\u7684\u8026\u5408\u5ea6\uff0c\u6240\u4ee5\u5373\u4f7f\u4e00\u4e2a\u5904\u7406\u6d88\u606f\u7684\u8fdb\u7a0b\u6302\u6389\uff0c\u52a0\u5165\u961f\u5217\u4e2d\u7684\u6d88\u606f\u4ecd\u7136\u53ef\u4ee5\u5728\u7cfb\u7edf\u6062\u590d\u540e\u88ab\u5904\u7406\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\"><strong style=\"color: black;\">\u987a\u5e8f\u4fdd\u8bc1<\/strong>\uff1a\u5728\u5927\u591a\u4f7f\u7528\u573a\u666f\u4e0b\uff0c\u6570\u636e\u5904\u7406\u7684\u987a\u5e8f\u90fd\u5f88\u91cd\u8981\u3002\u5927\u90e8\u5206\u6d88\u606f\u961f\u5217\u672c\u6765\u5c31\u662f\u6392\u5e8f\u7684\uff0c\u5e76\u4e14\u80fd\u4fdd\u8bc1\u6570\u636e\u4f1a\u6309\u7167\u7279\u5b9a\u7684\u987a\u5e8f\u6765\u5904\u7406\u3002\uff08Kafka \u4fdd\u8bc1\u4e00\u4e2a Partition \u5185\u7684\u6d88\u606f\u7684\u6709\u5e8f\u6027\uff09<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\"><strong style=\"color: black;\">\u7f13\u51b2<\/strong>\uff1a\u6709\u52a9\u4e8e\u63a7\u5236\u548c\u4f18\u5316\u6570\u636e\u6d41\u7ecf\u8fc7\u7cfb\u7edf\u7684\u901f\u5ea6\uff0c \u89e3\u51b3\u751f\u4ea7\u6d88\u606f\u548c\u6d88\u8d39\u6d88\u606f\u7684\u5904\u7406\u901f\u5ea6\u4e0d\u4e00\u81f4\u7684\u60c5\u51b5\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\"><strong style=\"color: black;\">\u5f02\u6b65\u901a\u4fe1<\/strong>\uff1a\u5f88\u591a\u65f6\u5019\uff0c\u7528\u6237\u4e0d\u60f3\u4e5f\u4e0d\u9700\u8981\u7acb\u5373\u5904\u7406\u6d88\u606f\u3002\u6d88\u606f\u961f\u5217\u63d0\u4f9b\u4e86\u5f02\u6b65\u5904\u7406\u673a\u5236\uff0c\u5141\u8bb8\u7528\u6237\u628a\u4e00\u4e2a\u6d88\u606f\u653e\u5165\u961f\u5217\uff0c\u4f46\u5e76\u4e0d\u7acb\u5373\u5904\u7406\u5b83\u3002\u60f3\u5411\u961f\u5217\u4e2d\u653e\u5165\u591a\u5c11\u6d88\u606f\u5c31\u653e\u591a\u5c11\uff0c\u7136\u540e\u5728\u9700\u8981\u7684\u65f6\u5019\u518d\u53bb\u5904\u7406\u5b83\u4eec\u3002<\/section>\n<\/li>\n<\/ol>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>1.2.3 \u6d88\u606f\u961f\u5217\u7684\u4e24\u79cd\u6a21\u5f0f<span style=\"display: none;\"><\/span><\/h4>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;\"><strong>\u70b9\u5bf9\u70b9\u6a21\u5f0f<\/strong>\uff08\u4e00\u5bf9\u4e00\uff0c\u6d88\u8d39\u8005\u4e3b\u52a8\u62c9\u53d6\u6570\u636e\uff0c\u6536\u5230\u540e\u6d88\u606f\u6e05\u9664\uff09<\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;\">\u6d88\u606f\u751f\u4ea7\u8005\u751f\u4ea7\u6d88\u606f\u53d1\u9001\u5230 Queue \u4e2d\uff0c\u7136\u540e\u6d88\u8d39\u8005\u4ece Queue \u4e2d\u53d6\u51fa\u5e76\u4e14\u6d88\u8d39\u6d88\u606f\u3002\u6d88\u606f\u88ab\u6d88\u8d39\u4ee5\u540e\uff0cqueue \u4e2d\u4e0d\u518d\u6709\u5b58\u50a8\uff0c\u6240\u4ee5\u6d88\u606f\u6d88\u8d39\u8005\u4e0d\u53ef\u80fd\u6d88\u8d39\u5230\u5df2\u7ecf\u88ab\u6d88\u8d39\u7684\u6d88\u606f\u3002Queue \u652f\u6301\u5b58\u5728\u591a\u4e2a\u6d88\u8d39\u8005\uff0c\u4f46\u662f\u5bf9\u4e00\u4e2a\u6d88\u606f\u800c\u8a00\uff0c\u53ea\u4f1a\u6709\u4e00\u4e2a\u6d88\u8d39\u8005\u53ef\u4ee5\u6d88\u8d39\u3002<\/p>\n<\/section>\n<\/li>\n<\/ul>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.20555555555555555\"  data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154540476.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.20555555555555555\"  data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154540476.png\"  \/><\/noscript><\/figure>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;\"><strong>\u53d1\u5e03\/\u8ba2\u9605\u6a21\u5f0f<\/strong>\uff08\u4e00\u5bf9\u591a\uff0c\u6570\u636e\u751f\u4ea7\u540e\uff0c\u63a8\u9001\u7ed9\u6240\u6709\u8ba2\u9605\u8005\uff09<\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;\">\u6d88\u606f\u751f\u4ea7\u8005\uff08\u53d1\u5e03\uff09\u5c06\u6d88\u606f\u53d1\u5e03\u5230 topic \u4e2d\uff0c\u540c\u65f6\u6709\u591a\u4e2a\u6d88\u606f\u6d88\u8d39\u8005\uff08\u8ba2\u9605\uff09\u6d88\u8d39\u8be5\u6d88\u606f\u3002\u548c\u70b9\u5bf9\u70b9\u65b9\u5f0f\u4e0d\u540c\uff0c\u53d1\u5e03\u5230 topic \u7684\u6d88\u606f\u4f1a\u88ab\u6240\u6709\u8ba2\u9605\u8005\u6d88\u8d39\u3002<\/p>\n<\/section>\n<\/li>\n<\/ul>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.25277777777777777\"  data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154542188.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.25277777777777777\"  data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154542188.png\"  \/><\/noscript><\/figure>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;\"><span style=\"display: none;\"><\/span>1.3 Kafka \u57fa\u7840\u67b6\u6784\u56fe<span style=\"display: none;\"><\/span><\/h3>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.5027777777777778\"  data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154543568.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.5027777777777778\"  data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154543568.png\"  \/><\/noscript><\/figure>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">Producer \uff1a\u6d88\u606f\u751f\u4ea7\u8005\uff0c\u5c31\u662f\u5411 kafka broker \u53d1\u6d88\u606f\u7684\u5ba2\u6237\u7aef\uff1b<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">Consumer \uff1a\u6d88\u606f\u6d88\u8d39\u8005\uff0c\u5411 kafka broker \u53d6\u6d88\u606f\u7684\u5ba2\u6237\u7aef\uff1b<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">Consumer Group \uff08CG\uff09\uff1a\u6d88\u8d39\u8005\u7ec4\uff0c\u7531\u591a\u4e2a consumer \u7ec4\u6210\u3002<strong style=\"color: black;\">\u6d88\u8d39\u8005\u7ec4\u5185\u6bcf\u4e2a\u6d88\u8d39\u8005\u8d1f\u8d23\u6d88\u8d39\u4e0d\u540c\u5206\u533a\u7684\u6570\u636e\uff0c\u4e00\u4e2a\u5206\u533a\u53ea\u80fd\u7531\u4e00\u4e2a\u7ec4\u5185\u6d88\u8d39\u8005\u6d88\u8d39\uff1b\u6d88\u8d39\u8005\u7ec4\u4e4b\u95f4\u4e92\u4e0d\u5f71\u54cd<\/strong>\u3002\u6240\u6709\u7684\u6d88\u8d39\u8005\u90fd\u5c5e\u4e8e\u67d0\u4e2a\u6d88\u8d39\u8005\u7ec4\uff0c\u5373\u6d88\u8d39\u8005\u7ec4\u662f\u903b\u8f91\u4e0a\u7684\u4e00\u4e2a\u8ba2\u9605\u8005\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">Broker \uff1a\u4e00\u53f0 kafka \u670d\u52a1\u5668\u5c31\u662f\u4e00\u4e2a broker\uff08\u867d\u7136\u591a\u4e2a Broker \u8fdb\u7a0b\u80fd\u591f\u8fd0\u884c\u5728\u540c\u4e00\u53f0\u673a\u5668\u4e0a\uff0c\u4f46\u66f4\u5e38\u89c1\u7684\u505a\u6cd5\u662f\u5c06\u4e0d\u540c\u7684 Broker \u5206\u6563\u8fd0\u884c\u5728\u4e0d\u540c\u7684\u673a\u5668\u4e0a\uff09\u3002\u4e00\u4e2a\u96c6\u7fa4\u7531\u591a\u4e2a broker \u7ec4\u6210\u3002\u4e00\u4e2a broker \u53ef\u4ee5\u5bb9\u7eb3\u591a\u4e2a topic\uff1b<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">Topic \uff1a\u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a\u961f\u5217\uff0cKafka \u7684\u6d88\u606f\u901a\u8fc7 Topics(\u4e3b\u9898) \u8fdb\u884c\u5206\u7c7b\uff0c\u751f\u4ea7\u8005\u548c\u6d88\u8d39\u8005\u9762\u5411\u7684\u90fd\u662f\u4e00\u4e2a topic\uff1b<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">Partition\uff1a\u4e3a\u4e86\u5b9e\u73b0\u6269\u5c55\u6027\uff0c\u4e00\u4e2a\u975e\u5e38\u5927\u7684 topic \u53ef\u4ee5\u5206\u5e03\u5230\u591a\u4e2a broker\uff08\u5373\u670d\u52a1\u5668\uff09\u4e0a\uff0c \u4e00\u4e2a topic \u53ef\u4ee5\u5206\u4e3a\u591a\u4e2a partition\uff0c\u6bcf\u4e2a partition \u662f\u4e00\u4e2a\u6709\u5e8f\u7684\u961f\u5217\uff1bpartition \u4e2d\u7684\u6bcf\u6761\u6d88\u606f\u90fd\u4f1a\u88ab\u5206\u914d\u4e00\u4e2a\u6709\u5e8f\u7684 id\uff08 offset\uff09\u3002kafka \u53ea\u4fdd\u8bc1\u6309\u4e00\u4e2a partition \u4e2d\u7684\u987a\u5e8f\u5c06\u6d88\u606f\u53d1\u7ed9 consumer\uff0c\u4e0d\u4fdd\u8bc1\u4e00\u4e2a topic \u7684\u6574\u4f53\uff08\u591a\u4e2a partition \u95f4\uff09\u7684\u987a\u5e8f\uff1b<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">Replica\uff1a\u526f\u672c\uff0c\u4e3a\u4fdd\u8bc1\u96c6\u7fa4\u4e2d\u7684\u67d0\u4e2a\u8282\u70b9\u53d1\u751f\u6545\u969c\u65f6\uff0c\u8be5\u8282\u70b9\u4e0a\u7684 partition \u6570\u636e\u4e0d\u4e22\u5931\uff0c\u4e14 kafka \u4ecd\u7136\u80fd\u591f\u7ee7\u7eed\u5de5\u4f5c\uff0ckafka \u63d0\u4f9b\u4e86\u526f\u672c\u673a\u5236\uff0c\u4e00\u4e2a topic \u7684\u6bcf\u4e2a\u5206\u533a\u90fd\u6709\u82e5\u5e72\u4e2a\u526f\u672c\uff0c \u4e00\u4e2a leader \u548c\u82e5\u5e72\u4e2a follower\uff1b<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">leader\uff1a\u6bcf\u4e2a\u5206\u533a\u591a\u4e2a\u526f\u672c\u7684\u201c\u4e3b\u201d\uff0c<strong style=\"color: black;\">\u751f\u4ea7\u8005\u53d1\u9001\u6570\u636e\u7684\u5bf9\u8c61\uff0c\u4ee5\u53ca\u6d88\u8d39\u8005\u6d88\u8d39\u6570\u636e\u7684\u5bf9\u8c61\u90fd\u662f leader<\/strong>\uff1b<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">follower\uff1a\u6bcf\u4e2a\u5206\u533a\u591a\u4e2a\u526f\u672c\u4e2d\u7684\u201c\u4ece\u201d\uff0c\u5b9e\u65f6\u4ece leader \u4e2d\u540c\u6b65\u6570\u636e\uff0c\u4fdd\u6301\u548c leader \u6570\u636e\u7684\u540c\u6b65\u3002leader \u53d1\u751f\u6545\u969c\u65f6\uff0c\u67d0\u4e2a follower \u4f1a\u6210\u4e3a\u65b0\u7684 follower\uff1b<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">offset\uff1akafka \u7684\u5b58\u50a8\u6587\u4ef6\u90fd\u662f\u6309\u7167 <code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">offset.kafka<\/code> \u6765\u547d\u540d\uff0c\u7528 offset \u505a\u540d\u5b57\u7684\u597d\u5904\u662f\u65b9\u4fbf\u67e5\u627e\u3002\u4f8b\u5982\u4f60\u60f3\u627e\u4f4d\u4e8e 2049 \u7684\u4f4d\u7f6e\uff0c\u53ea\u8981\u627e\u5230 2048.kafka \u7684\u6587\u4ef6\u5373\u53ef\u3002\u5f53\u7136 the first offset \u5c31\u662f 00000000000.kafka\u3002<\/section>\n<\/li>\n<\/ul>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"height: 1px;margin-top: 10px;margin-bottom: 10px;border-right: none;border-bottom: none;border-left: none;border-top-style: solid;border-top-color: black;\"  \/>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;\"><span style=\"display: none;\"><\/span><span style=\"display: inline-block;background: rgb(239, 112, 96);color: rgb(255, 255, 255);padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;\">2. Hello Kafka<\/span><span style=\"display: inline-block;vertical-align: bottom;border-bottom: 36px solid #efebe9;border-right: 20px solid transparent;\"> <\/span><\/h2>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;\"><span style=\"display: none;\"><\/span>2.1 \u52a8\u8d77\u624b\u6765<span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Quickstart<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4e2d\u6587\u7248\u5165\u95e8\u6307\u5357<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;\"><span style=\"display: none;\"><\/span>2.2 \u57fa\u672c\u6982\u5ff5(\u5b98\u65b9\u4ecb\u7ecd\u7ffb\u8bd1)<span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u7684\u6d41\u5904\u7406\u5e73\u53f0\u3002\u662f\u652f\u6301\u5206\u533a\u7684\uff08partition\uff09\u3001\u591a\u526f\u672c\u7684\uff08replica\uff09\uff0c\u57fa\u4e8e ZooKeeper \u534f\u8c03\u7684\u5206\u5e03\u5f0f\u6d88\u606f\u7cfb\u7edf\uff0c\u5b83\u7684\u6700\u5927\u7684\u7279\u6027\u5c31\u662f\u53ef\u4ee5\u5b9e\u65f6\u7684\u5904\u7406\u5927\u91cf\u6570\u636e\u4ee5\u6ee1\u8db3\u5404\u79cd\u9700\u6c42\u573a\u666f\uff1a\u6bd4\u5982\u57fa\u4e8e hadoop \u7684\u6279\u5904\u7406\u7cfb\u7edf\u3001\u4f4e\u5ef6\u8fdf\u7684\u5b9e\u65f6\u7cfb\u7edf\u3001storm\/Spark \u6d41\u5f0f\u5904\u7406\u5f15\u64ce\uff0cweb\/nginx \u65e5\u5fd7\u3001\u8bbf\u95ee\u65e5\u5fd7\uff0c\u6d88\u606f\u670d\u52a1\u7b49\u7b49<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u6709\u4e09\u4e2a\u5173\u952e\u80fd\u529b<span style=\"display: none;\"><\/span><\/h4>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\u5b83\u53ef\u4ee5\u8ba9\u4f60\u53d1\u5e03\u548c\u8ba2\u9605\u8bb0\u5f55\u6d41\u3002\u5728\u8fd9\u65b9\u9762\uff0c\u5b83\u7c7b\u4f3c\u4e8e\u4e00\u4e2a\u6d88\u606f\u961f\u5217\u6216\u4f01\u4e1a\u6d88\u606f\u7cfb\u7edf<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\u5b83\u53ef\u4ee5\u8ba9\u4f60\u6301\u4e45\u5316\u6536\u5230\u7684\u8bb0\u5f55\u6d41\uff0c\u4ece\u800c\u5177\u6709\u5bb9\u9519\u80fd\u529b<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\u5b83\u53ef\u4ee5\u8ba9\u4f60\u5904\u7406\u6536\u5230\u7684\u8bb0\u5f55\u6d41<\/section>\n<\/li>\n<\/ul>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u5e94\u7528\u4e8e\u4e24\u5927\u7c7b\u5e94\u7528<span style=\"display: none;\"><\/span><\/h4>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\u6784\u5efa\u5b9e\u65f6\u7684\u6d41\u6570\u636e\u7ba1\u9053\uff0c\u53ef\u9760\u5730\u83b7\u53d6\u7cfb\u7edf\u548c\u5e94\u7528\u7a0b\u5e8f\u4e4b\u95f4\u7684\u6570\u636e\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\u6784\u5efa\u5b9e\u65f6\u6d41\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u5bf9\u6570\u636e\u6d41\u8fdb\u884c\u8f6c\u6362\u6216\u53cd\u5e94\u3002<\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u60f3\u8981\u4e86\u89e3 Kafka \u5982\u4f55\u5177\u6709\u8fd9\u4e9b\u80fd\u529b\uff0c\u9996\u5148\uff0c\u660e\u786e\u51e0\u4e2a\u6982\u5ff5\uff1a<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">Kafka \u4f5c\u4e3a\u4e00\u4e2a\u96c6\u7fa4\u8fd0\u884c\u5728\u4e00\u4e2a\u6216\u591a\u4e2a\u670d\u52a1\u5668\u4e0a<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">Kafka &nbsp;\u96c6\u7fa4\u5b58\u50a8\u7684\u6d88\u606f\u662f\u4ee5\u4e3b\u9898\uff08topics\uff09\u4e3a\u7c7b\u522b\u8bb0\u5f55\u7684<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\u6bcf\u4e2a\u6d88\u606f\u8bb0\u5f55\u5305\u542b\u4e00\u4e2a\u952e\uff0c\u4e00\u4e2a\u503c\u548c\u65f6\u95f4\u6233<\/section>\n<\/li>\n<\/ul>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>Kafka\u6709\u4e94\u4e2a\u6838\u5fc3API\uff1a<span style=\"display: none;\"><\/span><\/h4>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;\"><strong>Producer API<\/strong> \u5141\u8bb8\u5e94\u7528\u7a0b\u5e8f\u53d1\u5e03\u8bb0\u5f55\u6d41\u81f3\u4e00\u4e2a\u6216\u591a\u4e2a Kafka \u7684\u8bdd\u9898(Topics)<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;\"><strong>Consumer API<\/strong> \u5141\u8bb8\u5e94\u7528\u7a0b\u5e8f\u8ba2\u9605\u4e00\u4e2a\u6216\u591a\u4e2a\u4e3b\u9898\uff0c\u5e76\u5904\u7406\u8fd9\u4e9b\u4e3b\u9898\u63a5\u6536\u5230\u7684\u8bb0\u5f55\u6d41<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;\"><strong>Streams API<\/strong> \u5141\u8bb8\u5e94\u7528\u7a0b\u5e8f\u5145\u5f53\u6d41\u5904\u7406\u5668\uff08stream processor\uff09\uff0c\u4ece\u4e00\u4e2a\u6216\u591a\u4e2a\u4e3b\u9898\u83b7\u53d6\u8f93\u5165\u6d41\uff0c\u5e76\u751f\u4ea7\u4e00\u4e2a\u8f93\u51fa\u6d41\u81f3\u4e00\u4e2a\u6216\u591a\u4e2a\u7684\u4e3b\u9898\uff0c\u80fd\u591f\u6709\u6548\u5730\u53d8\u6362\u8f93\u5165\u6d41\u4e3a\u8f93\u51fa\u6d41<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;\"><strong>Connector API<\/strong> \u5141\u8bb8\u6784\u5efa\u548c\u8fd0\u884c\u53ef\u91cd\u7528\u7684\u751f\u4ea7\u8005\u6216\u6d88\u8d39\u8005\uff0c\u80fd\u591f\u628a Kafka \u4e3b\u9898\u8fde\u63a5\u5230\u73b0\u6709\u7684\u5e94\u7528\u7a0b\u5e8f\u6216\u6570\u636e\u7cfb\u7edf\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u8fde\u63a5\u5230\u5173\u7cfb\u6570\u636e\u5e93\u7684\u8fde\u63a5\u5668(connector)\u53ef\u80fd\u4f1a\u83b7\u53d6\u6bcf\u4e2a\u8868\u7684\u53d8\u5316<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n<p style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;\"><strong>Admin API<\/strong> \u5141\u8bb8\u7ba1\u7406\u548c\u68c0\u67e5\u4e3b\u9898\u3001brokes \u548c\u5176\u4ed6 Kafka \u5bf9\u8c61\u3002\uff08\u8fd9\u4e2a\u662f\u65b0\u7248\u672c\u624d\u6709\u7684\uff09<\/p>\n<\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u7684\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u901a\u4fe1\u662f\u9760\u4e00\u4e2a\u7b80\u5355\u7684\uff0c\u9ad8\u6027\u80fd\u7684\uff0c\u4e0e\u8bed\u8a00\u65e0\u5173\u7684 TCP \u534f\u8bae\u5b8c\u6210\u7684\u3002\u8fd9\u4e2a\u534f\u8bae\u6709\u4e0d\u540c\u7684\u7248\u672c\uff0c\u5e76\u4fdd\u6301\u5411\u540e\u517c\u5bb9\u65e7\u7248\u672c\u3002Kafka \u4e0d\u5149\u63d0\u4f9b\u4e86\u4e00\u4e2a Java \u5ba2\u6237\u7aef\uff0c\u8fd8\u6709\u8bb8\u591a\u8bed\u8a00\u7248\u672c\u7684\u5ba2\u6237\u7aef\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u4e3b\u9898\u548c\u65e5\u5fd7<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4e3b\u9898\u662f\u540c\u4e00\u7c7b\u522b\u7684\u6d88\u606f\u8bb0\u5f55\uff08record\uff09\u7684\u96c6\u5408\u3002Kafka \u7684\u4e3b\u9898\u652f\u6301\u591a\u7528\u6237\u8ba2\u9605\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u4e00\u4e2a\u4e3b\u9898\u53ef\u4ee5\u6709\u96f6\u4e2a\uff0c\u4e00\u4e2a\u6216\u591a\u4e2a\u6d88\u8d39\u8005\u8ba2\u9605\u5199\u5165\u7684\u6570\u636e\u3002\u5bf9\u4e8e\u6bcf\u4e2a\u4e3b\u9898\uff0cKafka \u96c6\u7fa4\u90fd\u4f1a\u7ef4\u62a4\u4e00\u4e2a\u5206\u533a\u65e5\u5fd7\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.6418269230769231\"  data-type=\"png\" data-w=\"416\" style=\"display: block;margin-right: auto;margin-left: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154546918.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.6418269230769231\"  data-type=\"png\" data-w=\"416\" style=\"display: block;margin-right: auto;margin-left: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154546918.png\"  \/><\/noscript><\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\"><strong>\u6bcf\u4e2a\u5206\u533a\u662f\u4e00\u4e2a\u6709\u5e8f\u7684\uff0c\u4e0d\u53ef\u53d8\u7684\u6d88\u606f\u5e8f\u5217<\/strong>\uff0c\u65b0\u7684\u6d88\u606f\u4e0d\u65ad\u8ffd\u52a0\u5230 partition \u7684\u672b\u5c3e\u3002\u5728\u6bcf\u4e2a partition \u4e2d\uff0c\u6bcf\u6761\u6d88\u606f\u90fd\u4f1a\u88ab\u5206\u914d\u4e00\u4e2a\u987a\u5e8f\u7684\u552f\u4e00\u6807\u8bc6\uff0c\u8fd9\u4e2a\u6807\u8bc6\u88ab\u79f0\u4e3a <strong>offset<\/strong>\uff0c\u5373\u504f\u79fb\u91cf\u3002<strong>kafka \u4e0d\u80fd\u4fdd\u8bc1\u5168\u5c40\u6709\u5e8f\uff0c\u53ea\u80fd\u4fdd\u8bc1\u5206\u533a\u5185\u6709\u5e8f<\/strong> \u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u96c6\u7fa4\u4fdd\u7559\u6240\u6709\u53d1\u5e03\u7684\u8bb0\u5f55\uff0c\u4e0d\u7ba1\u8fd9\u4e2a\u8bb0\u5f55\u6709\u6ca1\u6709\u88ab\u6d88\u8d39\u8fc7\uff0c<strong>Kafka \u63d0\u4f9b\u53ef\u914d\u7f6e\u7684\u4fdd\u7559\u7b56\u7565\u53bb\u5220\u9664\u65e7\u6570\u636e<\/strong>(\u8fd8\u6709\u4e00\u79cd\u7b56\u7565\u6839\u636e\u5206\u533a\u5927\u5c0f\u5220\u9664\u6570\u636e)\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5c06\u4fdd\u7559\u7b56\u7565\u8bbe\u7f6e\u4e3a\u4e24\u5929\uff0c\u5728\u6570\u636e\u53d1\u5e03\u540e\u4e24\u5929\uff0c\u5b83\u53ef\u7528\u4e8e\u6d88\u8d39\uff0c\u4e4b\u540e\u5b83\u5c06\u88ab\u4e22\u5f03\u4ee5\u817e\u51fa\u7a7a\u95f4\u3002Kafka \u7684\u6027\u80fd\u8ddf\u5b58\u50a8\u7684\u6570\u636e\u91cf\u7684\u5927\u5c0f\u65e0\u5173\uff08\u4f1a\u6301\u4e45\u5316\u5230\u786c\u76d8\uff09\uff0c \u6240\u4ee5\u5c06\u6570\u636e\u5b58\u50a8\u5f88\u957f\u4e00\u6bb5\u65f6\u95f4\u662f\u6ca1\u6709\u95ee\u9898\u7684\u3002<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.6092592592592593\"  data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154547495.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.6092592592592593\"  data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154547495.png\"  \/><\/noscript><\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4e8b\u5b9e\u4e0a\uff0c\u5728\u5355\u4e2a\u6d88\u8d39\u8005\u5c42\u9762\u4e0a\uff0c\u6bcf\u4e2a\u6d88\u8d39\u8005\u4fdd\u5b58\u7684\u552f\u4e00\u7684\u5143\u6570\u636e\u5c31\u662f\u5b83\u6240\u6d88\u8d39\u7684\u6570\u636e\u65e5\u5fd7\u6587\u4ef6\u7684\u504f\u79fb\u91cf\u3002\u504f\u79fb\u91cf\u662f\u7531\u6d88\u8d39\u8005\u6765\u63a7\u5236\u7684\uff0c\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u6d88\u8d39\u8005\u4f1a\u5728\u8bfb\u53d6\u8bb0\u5f55\u65f6\u7ebf\u6027\u7684\u63d0\u9ad8\u5176\u504f\u79fb\u91cf\u3002\u4e0d\u8fc7\u7531\u4e8e\u504f\u79fb\u91cf\u662f\u7531\u6d88\u8d39\u8005\u63a7\u5236\uff0c\u6240\u4ee5\u6d88\u8d39\u8005\u53ef\u4ee5\u5c06\u504f\u79fb\u91cf\u8bbe\u7f6e\u5230\u4efb\u4f55\u4f4d\u7f6e\uff0c\u6bd4\u5982\u8bbe\u7f6e\u5230\u4ee5\u524d\u7684\u4f4d\u7f6e\u5bf9\u6570\u636e\u8fdb\u884c\u91cd\u590d\u6d88\u8d39\uff0c\u6216\u8005\u8bbe\u7f6e\u5230\u6700\u65b0\u4f4d\u7f6e\u6765\u8df3\u8fc7\u4e00\u4e9b\u6570\u636e\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u5206\u5e03\u5f0f<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u65e5\u5fd7\u7684\u5206\u533a\u4f1a\u8de8\u670d\u52a1\u5668\u7684\u5206\u5e03\u5728 Kafka \u96c6\u7fa4\u4e2d\uff0c\u6bcf\u4e2a\u670d\u52a1\u5668\u4f1a\u5171\u4eab\u5206\u533a\u8fdb\u884c\u6570\u636e\u8bf7\u6c42\u7684\u5904\u7406\u3002<strong>\u6bcf\u4e2a\u5206\u533a\u53ef\u4ee5\u914d\u7f6e\u4e00\u5b9a\u6570\u91cf\u7684\u526f\u672c\u5206\u533a\u63d0\u4f9b\u5bb9\u9519\u80fd\u529b<\/strong>\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\"><strong>\u6bcf\u4e2a\u5206\u533a\u90fd\u6709\u4e00\u4e2a\u670d\u52a1\u5668\u5145\u5f53\u201cleader\u201d\u548c\u96f6\u4e2a\u6216\u591a\u4e2a\u670d\u52a1\u5668\u5145\u5f53\u201cfollowers\u201d<\/strong>\u3002leader \u5904\u7406\u6240\u6709\u7684\u8bfb\u53d6\u548c\u5199\u5165\u5206\u533a\u7684\u8bf7\u6c42\uff0c\u800c followers \u88ab\u52a8\u7684\u4ece\u9886\u5bfc\u8005\u62f7\u8d1d\u6570\u636e\u3002\u5982\u679c leader \u5931\u8d25\u4e86\uff0cfollowers \u4e4b\u4e00\u5c06\u81ea\u52a8\u6210\u4e3a\u65b0\u7684\u9886\u5bfc\u8005\u3002\u6bcf\u4e2a\u670d\u52a1\u5668\u53ef\u80fd\u5145\u5f53\u4e00\u4e9b\u5206\u533a\u7684 leader \u548c\u5176\u4ed6\u5206\u533a\u7684 follower\uff0c\u6240\u4ee5 Kafka \u96c6\u7fa4\u5185\u7684\u8d1f\u8f7d\u4f1a\u6bd4\u8f83\u5747\u8861\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u751f\u4ea7\u8005<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u751f\u4ea7\u8005\u53d1\u5e03\u6570\u636e\u5230\u4ed6\u4eec\u6240\u9009\u62e9\u7684\u4e3b\u9898\u3002\u751f\u4ea7\u8005\u8d1f\u8d23\u9009\u62e9\u628a\u8bb0\u5f55\u5206\u914d\u5230\u4e3b\u9898\u4e2d\u7684\u54ea\u4e2a\u5206\u533a\u3002\u8fd9\u53ef\u4ee5\u4f7f\u7528\u8f6e\u8be2\u7b97\u6cd5( round-robin)\u8fdb\u884c\u7b80\u5355\u5730\u5e73\u8861\u8d1f\u8f7d\uff0c\u4e5f\u53ef\u4ee5\u6839\u636e\u4e00\u4e9b\u66f4\u590d\u6742\u7684\u8bed\u4e49\u5206\u533a\u7b97\u6cd5\uff08\u6bd4\u5982\u57fa\u4e8e\u8bb0\u5f55\u4e00\u4e9b\u952e\u503c\uff09\u6765\u5b8c\u6210\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u6d88\u8d39\u8005<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6d88\u8d39\u8005\u4ee5\u6d88\u8d39\u7fa4\uff08<strong>consumer group<\/strong> \uff09\u7684\u540d\u79f0\u6765\u6807\u8bc6\u81ea\u5df1\uff0c\u6bcf\u4e2a\u53d1\u5e03\u5230\u4e3b\u9898\u7684\u6d88\u606f\u90fd\u4f1a\u53d1\u9001\u7ed9\u8ba2\u9605\u4e86\u8fd9\u4e2a\u4e3b\u9898\u7684\u6d88\u8d39\u7fa4\u91cc\u9762\u7684\u4e00\u4e2a\u6d88\u8d39\u8005\u7684\u4e00\u4e2a\u5b9e\u4f8b\u3002\u6d88\u8d39\u8005\u7684\u5b9e\u4f8b\u53ef\u4ee5\u5728\u5355\u72ec\u7684\u8fdb\u7a0b\u6216\u5355\u72ec\u7684\u673a\u5668\u4e0a\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5982\u679c\u6240\u6709\u7684\u6d88\u8d39\u8005\u5b9e\u4f8b\u90fd\u5c5e\u4e8e\u76f8\u540c\u7684\u6d88\u8d39\u7fa4\uff0c\u90a3\u4e48\u8bb0\u5f55\u5c06\u6709\u6548\u5730\u88ab\u5747\u8861\u5230\u6bcf\u4e2a\u6d88\u8d39\u8005\u5b9e\u4f8b\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5982\u679c\u6240\u6709\u7684\u6d88\u8d39\u8005\u5b9e\u4f8b\u6709\u4e0d\u540c\u7684\u6d88\u8d39\u7fa4\uff0c\u90a3\u4e48\u6bcf\u4e2a\u6d88\u606f\u5c06\u88ab\u5e7f\u64ad\u5230\u6240\u6709\u7684\u6d88\u8d39\u8005\u8fdb\u7a0b\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\"><strong>\u8fd9\u662f kafka \u7528\u6765\u5b9e\u73b0\u4e00\u4e2a topic \u6d88\u606f\u7684\u5e7f\u64ad\uff08\u53d1\u7ed9\u6240\u6709\u7684 consumer\uff09 \u548c\u5355\u64ad\uff08\u53d1\u7ed9\u4efb\u610f\u4e00\u4e2a consumer\uff09\u7684\u624b\u6bb5<\/strong>\u3002\u4e00\u4e2a topic \u53ef\u4ee5\u6709\u591a\u4e2a CG\u3002topic \u7684\u6d88\u606f\u4f1a\u590d\u5236 \uff08\u4e0d\u662f\u771f\u7684\u590d\u5236\uff0c\u662f\u6982\u5ff5\u4e0a\u7684\uff09\u5230\u6240\u6709\u7684 CG\uff0c\u4f46\u6bcf\u4e2a partion \u53ea\u4f1a\u628a\u6d88\u606f\u53d1\u7ed9\u8be5 CG \u4e2d\u7684\u4e00 \u4e2a consumer\u3002\u5982\u679c\u9700\u8981\u5b9e\u73b0\u5e7f\u64ad\uff0c\u53ea\u8981\u6bcf\u4e2a consumer \u6709\u4e00\u4e2a\u72ec\u7acb\u7684 CG \u5c31\u53ef\u4ee5\u4e86\u3002\u8981\u5b9e\u73b0\u5355\u64ad\u53ea\u8981\u6240\u6709\u7684 consumer \u5728\u540c\u4e00\u4e2a CG\u3002\u7528 CG \u8fd8\u53ef\u4ee5\u5c06 consumer \u8fdb\u884c\u81ea\u7531\u7684\u5206\u7ec4\u800c\u4e0d\u9700\u8981\u591a\u6b21\u53d1\u9001\u6d88\u606f\u5230\u4e0d\u540c\u7684 topic\uff1b<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.5316455696202531\"  data-type=\"png\" data-w=\"474\" style=\"display: block;margin-right: auto;margin-left: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154549887.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.5316455696202531\"  data-type=\"png\" data-w=\"474\" style=\"display: block;margin-right: auto;margin-left: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154549887.png\"  \/><\/noscript><\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\"><strong>\u4e3e\u4e2a\u6817\u5b50\uff1a<\/strong><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u4e00\u4e2a\u4e24\u4e2a\u8282\u70b9\u7684 Kafka \u96c6\u7fa4\u4e0a\u62e5\u6709\u4e00\u4e2a\u56db\u4e2a partition\uff08P0-P3\uff09\u7684 topic\u3002\u6709\u4e24\u4e2a\u6d88\u8d39\u8005\u7ec4\u90fd\u5728\u6d88\u8d39\u8fd9\u4e2a topic \u4e2d\u7684\u6570\u636e\uff0c\u6d88\u8d39\u8005\u7ec4 A \u6709\u4e24\u4e2a\u6d88\u8d39\u8005\u5b9e\u4f8b\uff0c\u6d88\u8d39\u8005\u7ec4 B \u6709\u56db\u4e2a\u6d88\u8d39\u8005\u5b9e\u4f8b\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4ece\u56fe\u4e2d\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u5728\u540c\u4e00\u4e2a\u6d88\u8d39\u8005\u7ec4\u4e2d\uff0c\u6bcf\u4e2a\u6d88\u8d39\u8005\u5b9e\u4f8b\u53ef\u4ee5\u6d88\u8d39\u591a\u4e2a\u5206\u533a\uff0c\u4f46\u662f\u6bcf\u4e2a\u5206\u533a\u6700\u591a\u53ea\u80fd\u88ab\u6d88\u8d39\u8005\u7ec4\u4e2d\u7684\u4e00\u4e2a\u5b9e\u4f8b\u6d88\u8d39\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u5982\u679c\u6709\u4e00\u4e2a 4 \u4e2a\u5206\u533a\u7684\u4e3b\u9898\uff0c\u90a3\u4e48\u6d88\u8d39\u8005\u7ec4\u4e2d\u6700\u591a\u53ea\u80fd\u6709 4 \u4e2a\u6d88\u8d39\u8005\u5b9e\u4f8b\u53bb\u6d88\u8d39\uff0c\u591a\u51fa\u6765\u7684\u90fd\u4e0d\u4f1a\u88ab\u5206\u914d\u5230\u5206\u533a\u3002\u5176\u5b9e\u8fd9\u4e5f\u5f88\u597d\u7406\u89e3\uff0c\u5982\u679c\u5141\u8bb8\u4e24\u4e2a\u6d88\u8d39\u8005\u5b9e\u4f8b\u540c\u65f6\u6d88\u8d39\u540c\u4e00\u4e2a\u5206\u533a\uff0c\u90a3\u4e48\u5c31\u65e0\u6cd5\u8bb0\u5f55\u8fd9\u4e2a\u5206\u533a\u88ab\u8fd9\u4e2a\u6d88\u8d39\u8005\u7ec4\u6d88\u8d39\u7684 offset \u4e86\u3002\u5982\u679c\u5728\u6d88\u8d39\u8005\u7ec4\u4e2d\u52a8\u6001\u7684\u4e0a\u7ebf\u6216\u4e0b\u7ebf\u6d88\u8d39\u8005\uff0c\u90a3\u4e48 Kafka \u96c6\u7fa4\u4f1a\u81ea\u52a8\u8c03\u6574\u5206\u533a\u4e0e\u6d88\u8d39\u8005\u5b9e\u4f8b\u95f4\u7684\u5bf9\u5e94\u5173\u7cfb\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\"><strong>Kafka\u6d88\u8d39\u7fa4\u7684\u5b9e\u73b0\u65b9\u5f0f\u662f\u901a\u8fc7\u5206\u5272\u65e5\u5fd7\u7684\u5206\u533a\uff0c\u5206\u7ed9\u6bcf\u4e2a Consumer \u5b9e\u4f8b\uff0c\u4f7f\u6bcf\u4e2a\u5b9e\u4f8b\u5728\u4efb\u4f55\u65f6\u95f4\u70b9\u7684\u90fd\u53ef\u4ee5\u201c\u516c\u5e73\u5206\u4eab\u201d\u72ec\u5360\u7684\u5206\u533a<\/strong>\u3002\u7ef4\u6301\u6d88\u8d39\u7fa4\u4e2d\u7684\u6210\u5458\u5173\u7cfb\u7684\u8fd9\u4e2a\u8fc7\u7a0b\u662f\u901a\u8fc7 Kafka \u52a8\u6001\u534f\u8bae\u5904\u7406\u3002\u5982\u679c\u65b0\u7684\u5b9e\u4f8b\u52a0\u5165\u8be5\u7ec4\uff0c\u4ed6\u5c06\u63a5\u7ba1\u8be5\u7ec4\u7684\u5176\u4ed6\u6210\u5458\u7684\u4e00\u4e9b\u5206\u533a\uff1b\u5982\u679c\u4e00\u4e2a\u5b9e\u4f8b\u6b7b\u4ea1\uff0c\u5176\u5206\u533a\u5c06\u88ab\u5206\u914d\u5230\u5269\u4f59\u7684\u5b9e\u4f8b\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u53ea\u4fdd\u8bc1\u4e00\u4e2a\u5206\u533a\u5185\u7684\u6d88\u606f\u6709\u5e8f\uff0c\u4e0d\u80fd\u4fdd\u8bc1\u4e00\u4e2a\u4e3b\u9898\u7684\u4e0d\u540c\u5206\u533a\u4e4b\u95f4\u7684\u6d88\u606f\u6709\u5e8f\u3002\u5206\u533a\u7684\u6d88\u606f\u6709\u5e8f\u4e0e\u4f9d\u9760\u4e3b\u952e\u8fdb\u884c\u6570\u636e\u5206\u533a\u7684\u80fd\u529b\u76f8\u7ed3\u5408\u8db3\u4ee5\u6ee1\u8db3\u5927\u591a\u6570\u5e94\u7528\u7684\u8981\u6c42\u3002\u4f46\u662f\uff0c\u5982\u679c\u4f60\u60f3\u8981\u4fdd\u8bc1\u6240\u6709\u7684\u6d88\u606f\u90fd\u7edd\u5bf9\u6709\u5e8f\u53ef\u4ee5\u53ea\u4e3a\u4e00\u4e2a\u4e3b\u9898\u5206\u914d\u4e00\u4e2a\u5206\u533a\uff0c\u867d\u7136\u8fd9\u5c06\u610f\u5473\u7740\u6bcf\u4e2a\u6d88\u8d39\u7fa4\u540c\u65f6\u53ea\u80fd\u6709\u4e00\u4e2a\u6d88\u8d39\u8fdb\u7a0b\u5728\u6d88\u8d39\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u4fdd\u8bc1<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u63d0\u4f9b\u4e86\u4ee5\u4e0b\u4e00\u4e9b\u9ad8\u7ea7\u522b\u7684\u4fdd\u8bc1\uff1a<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\u7531\u751f\u4ea7\u8005\u53d1\u9001\u5230\u4e00\u4e2a\u7279\u5b9a\u7684\u4e3b\u9898\u5206\u533a\u7684\u6d88\u606f\u5c06\u88ab\u4ee5\u4ed6\u4eec\u88ab\u53d1\u9001\u7684\u987a\u5e8f\u6765\u8ffd\u52a0\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u5982\u679c\u4e00\u4e2a\u6d88\u606f M1 \u548c\u6d88\u606f M2 \u90fd\u6765\u81ea\u540c\u4e00\u4e2a\u751f\u4ea7\u8005\uff0cM1 \u5148\u53d1\uff0c\u90a3\u4e48 M1 \u5c06\u6709\u4e00\u4e2a\u4f4e\u4e8e M2 \u7684\u504f\u79fb\uff0c\u4f1a\u66f4\u65e9\u5728\u65e5\u5fd7\u4e2d\u51fa\u73b0\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\u6d88\u8d39\u8005\u770b\u5230\u7684\u8bb0\u5f55\u6392\u5e8f\u5c31\u662f\u8bb0\u5f55\u88ab\u5b58\u50a8\u5728\u65e5\u5fd7\u4e2d\u7684\u987a\u5e8f\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\u5bf9\u4e8e\u526f\u672c\u56e0\u5b50 N \u7684\u4e3b\u9898\uff0c\u6211\u4eec\u5c06\u627f\u53d7\u6700\u591a N-1 \u6b21\u670d\u52a1\u5668\u6545\u969c\u5207\u6362\u800c\u4e0d\u4f1a\u635f\u5931\u4efb\u4f55\u7684\u5df2\u7ecf\u4fdd\u5b58\u7684\u8bb0\u5f55\u3002<\/section>\n<\/li>\n<\/ul>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;\"><span style=\"display: none;\"><\/span>2.3 Kafka\u7684\u4f7f\u7528\u573a\u666f<span style=\"display: none;\"><\/span><\/h3>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u6d88\u606f<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u88ab\u5f53\u4f5c\u4f20\u7edf\u6d88\u606f\u4e2d\u95f4\u4ef6\u7684\u66ff\u4ee3\u54c1\u3002\u6d88\u606f\u4e2d\u95f4\u4ef6\u7684\u4f7f\u7528\u539f\u56e0\u6709\u591a\u79cd\uff08\u4ece\u6570\u636e\u751f\u4ea7\u8005\u89e3\u8026\u5904\u7406\uff0c\u7f13\u5b58\u672a\u5904\u7406\u7684\u6d88\u606f\u7b49\uff09\u3002\u4e0e\u5927\u591a\u6570\u6d88\u606f\u7cfb\u7edf\u76f8\u6bd4\uff0cKafka \u5177\u6709\u66f4\u597d\u7684\u541e\u5410\u91cf\uff0c\u5185\u7f6e\u7684\u5206\u533a\uff0c\u591a\u526f\u672c\u548c\u5bb9\u9519\u529f\u80fd\uff0c\u8fd9\u4f7f\u5176\u6210\u4e3a\u5927\u89c4\u6a21\u6d88\u606f\u5904\u7406\u5e94\u7528\u7a0b\u5e8f\u7684\u826f\u597d\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u7f51\u7ad9\u884c\u4e3a\u8ddf\u8e2a<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u7684\u521d\u8877\u5c31\u662f\u80fd\u591f\u5c06\u7528\u6237\u884c\u4e3a\u8ddf\u8e2a\u7ba1\u9053\u91cd\u6784\u4e3a\u4e00\u7ec4\u5b9e\u65f6\u53d1\u5e03-\u8ba2\u9605\u6570\u636e\u6e90\u3002\u8fd9\u610f\u5473\u7740\u7f51\u7ad9\u6d3b\u52a8\uff08\u9875\u9762\u6d4f\u89c8\u91cf\uff0c\u641c\u7d22\u6216\u5176\u4ed6\u7528\u6237\u884c\u4e3a\uff09\u5c06\u88ab\u53d1\u5e03\u5230\u4e2d\u5fc3\u4e3b\u9898\uff0c\u8fd9\u4e9b\u4e2d\u5fc3\u4e3b\u9898\u662f\u6bcf\u4e2a\u7528\u6237\u884c\u4e3a\u7c7b\u578b\u5bf9\u5e94\u4e00\u4e2a\u4e3b\u9898\u7684\u3002\u8fd9\u4e9b\u6570\u636e\u6e90\u53ef\u88ab\u8ba2\u9605\u8005\u83b7\u53d6\u5e76\u7528\u4e8e\u4e00\u7cfb\u5217\u7684\u573a\u666f\uff0c\u5305\u62ec\u5b9e\u65f6\u5904\u7406\uff0c\u5b9e\u65f6\u76d1\u63a7\u548c\u52a0\u8f7d\u5230 Hadoop \u6216\u79bb\u7ebf\u6570\u636e\u4ed3\u5e93\u7cfb\u7edf\u4e2d\u8fdb\u884c\u79bb\u7ebf\u5904\u7406\u548c\u62a5\u544a\u3002\u7528\u6237\u884c\u4e3a\u8ddf\u8e2a\u901a\u5e38\u4f1a\u4ea7\u751f\u5de8\u5927\u7684\u6570\u636e\u91cf\uff0c\u56e0\u4e3a\u7528\u6237\u6bcf\u4e2a\u9875\u9762\u7684\u6d4f\u89c8\u90fd\u4f1a\u751f\u6210\u8bb8\u591a\u884c\u4e3a\u6d3b\u52a8\u6d88\u606f\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u6d4b\u91cf<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u901a\u5e38\u7528\u4e8e\u76d1\u6d4b\u6570\u636e\u7684\u5904\u7406\u3002\u8fd9\u6d89\u53ca\u4ece\u5206\u5e03\u5f0f\u5e94\u7528\u7a0b\u5e8f\u805a\u96c6\u7edf\u8ba1\u6570\u636e\uff0c\u751f\u4ea7\u51fa\u96c6\u4e2d\u7684\u8fd0\u884c\u6570\u636e\u6e90 feeds\uff08\u4ee5\u4fbf\u8ba2\u9605\uff09\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u65e5\u5fd7\u805a\u5408<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u8bb8\u591a\u4eba\u7528 Kafka \u4f5c\u4e3a\u65e5\u5fd7\u805a\u5408\u89e3\u51b3\u65b9\u6848\u7684\u66ff\u4ee3\u54c1\u3002\u65e5\u5fd7\u805a\u5408\u901a\u5e38\u4ece\u670d\u52a1\u5668\u6536\u96c6\u7269\u7406\u65e5\u5fd7\u6587\u4ef6\uff0c\u5e76\u5c06\u5b83\u4eec\u96c6\u4e2d\u653e\u7f6e\uff08\u53ef\u80fd\u662f\u6587\u4ef6\u670d\u52a1\u5668\u6216HDFS\uff09\uff0c\u4ee5\u4fbf\u540e\u7eed\u5904\u7406\u3002kafka \u62bd\u8c61\u51fa\u6587\u4ef6\u7684\u7ec6\u8282\uff0c\u5e76\u5c06\u65e5\u5fd7\u6216\u4e8b\u4ef6\u6570\u636e\u4f5c\u4e3a\u6d88\u606f\u6d41\u6e05\u6670\u5730\u62bd\u8c61\u51fa\u6765\u3002\u8fd9\u4e3a\u4f4e\u65f6\u5ef6\u7684\u5904\u7406\u63d0\u4f9b\u652f\u6301\uff0c\u800c\u4e14\u66f4\u5bb9\u6613\u652f\u6301\u591a\u4e2a\u6570\u636e\u6e90\u548c\u5206\u5e03\u5f0f\u7684\u6570\u636e\u6d88\u8d39\u3002\u76f8\u6bd4\u96c6\u4e2d\u5f0f\u7684\u65e5\u5fd7\u5904\u7406\u7cfb\u7edf\uff08\u5982 Scribe \u6216 Flume\uff09\uff0cKafka \u6027\u80fd\u540c\u6837\u51fa\u8272\uff0c\u800c\u4e14\u56e0\u4e3a\u526f\u672c\u5907\u4efd\u63d0\u4f9b\u4e86\u66f4\u5f3a\u7684\u53ef\u9760\u6027\u4fdd\u8bc1\u548c\u66f4\u4f4e\u7684\u7aef\u5230\u7aef\u5ef6\u8fdf\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u6d41\u5904\u7406<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u7684\u6d41\u6570\u636e\u7ba1\u9053\u5728\u5904\u7406\u6570\u636e\u7684\u65f6\u5019\u5305\u542b\u591a\u4e2a\u9636\u6bb5\uff0c\u5176\u4e2d\u539f\u59cb\u8f93\u5165\u6570\u636e\u4ece Kafka \u4e3b\u9898\u88ab\u6d88\u8d39\u7136\u540e\u6c47\u603b\uff0c\u52a0\u5de5\uff0c\u6216\u8f6c\u5316\u6210\u65b0\u4e3b\u9898\u7528\u4e8e\u8fdb\u4e00\u6b65\u7684\u6d88\u8d39\u6216\u540e\u7eed\u5904\u7406\u3002\u4f8b\u5982\uff0c\u7528\u4e8e\u63a8\u8350\u65b0\u95fb\u6587\u7ae0\u7684\u6570\u636e\u6d41\u5904\u7406\u7ba1\u9053\u53ef\u80fd\u4ece RSS \u6e90\u6293\u53d6\u6587\u7ae0\u5185\u5bb9\uff0c\u5e76\u5c06\u5176\u53d1\u5e03\u5230\u201c\u6587\u7ae0\u201d\u4e3b\u9898; \u8fdb\u4e00\u6b65\u7684\u5904\u7406\u53ef\u80fd\u662f\u6807\u51c6\u5316\u6216\u5220\u9664\u91cd\u590d\u6570\u636e\uff0c\u7136\u540e\u53d1\u5e03\u5904\u7406\u8fc7\u7684\u6587\u7ae0\u5185\u5bb9\u5230\u4e00\u4e2a\u65b0\u7684\u4e3b\u9898\uff0c \u6700\u540e\u7684\u5904\u7406\u9636\u6bb5\u53ef\u80fd\u4f1a\u5c1d\u8bd5\u63a8\u8350\u8fd9\u4e2a\u5185\u5bb9\u7ed9\u7528\u6237\u3002\u8fd9\u79cd\u5904\u7406\u7ba1\u9053\u6839\u636e\u5404\u4e2a\u4e3b\u9898\u521b\u5efa\u5b9e\u65f6\u6570\u636e\u6d41\u56fe\u3002\u4ece\u7248\u672c 0.10.0.0 \u5f00\u59cb\uff0cApache Kafka \u52a0\u5165\u4e86\u8f7b\u91cf\u7ea7\u7684\u4f46\u529f\u80fd\u5f3a\u5927\u7684\u6d41\u5904\u7406\u5e93 <strong>Kafka Streams<\/strong>\uff0cKafka Streams \u652f\u6301\u5982\u4e0a\u6240\u8ff0\u7684\u6570\u636e\u5904\u7406\u3002\u9664\u4e86Kafka Streams\uff0c\u53ef\u4ee5\u9009\u62e9\u7684\u5f00\u6e90\u6d41\u5904\u7406\u5de5\u5177\u5305\u62ec <code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Apache Storm and Apache Samza<\/code>\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u4e8b\u4ef6\u6e90<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4e8b\u4ef6\u6e90\u662f\u4e00\u79cd\u5e94\u7528\u7a0b\u5e8f\u8bbe\u8ba1\u98ce\u683c\uff0c\u662f\u6309\u7167\u65f6\u95f4\u987a\u5e8f\u8bb0\u5f55\u7684\u72b6\u6001\u53d8\u5316\u7684\u5e8f\u5217\u3002Kafka \u7684\u975e\u5e38\u5f3a\u5927\u7684\u5b58\u50a8\u65e5\u5fd7\u6570\u636e\u7684\u80fd\u529b\u4f7f\u5b83\u6210\u4e3a\u6784\u5efa\u8fd9\u79cd\u5e94\u7528\u7a0b\u5e8f\u7684\u6781\u597d\u7684\u540e\u7aef\u9009\u62e9\u3002<\/p>\n<h4 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;\"><span style=\"display: none;\"><\/span>\u63d0\u4ea4\u65e5\u5fd7<span style=\"display: none;\"><\/span><\/h4>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Kafka \u53ef\u4ee5\u4e3a\u5206\u5e03\u5f0f\u7cfb\u7edf\u63d0\u4f9b\u4e00\u79cd\u5916\u90e8\u63d0\u4ea4\u65e5\u5fd7(commit-log)\u670d\u52a1\u3002\u65e5\u5fd7\u6709\u52a9\u4e8e\u8282\u70b9\u4e4b\u95f4\u590d\u5236\u6570\u636e\uff0c\u5e76\u4f5c\u4e3a\u4e00\u79cd\u6570\u636e\u91cd\u65b0\u540c\u6b65\u673a\u5236\u7528\u6765\u6062\u590d\u6545\u969c\u8282\u70b9\u7684\u6570\u636e\u3002Kafka \u7684 log compaction \u529f\u80fd\u6709\u52a9\u4e8e\u652f\u6301\u8fd9\u79cd\u7528\u6cd5\u3002Kafka \u5728\u8fd9\u79cd\u7528\u6cd5\u4e2d\u7c7b\u4f3c\u4e8e Apache BookKeeper \u9879\u76ee\u3002<\/p>\n<\/section>\n<p><br  \/><\/p>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u9876\u5c16\u67b6\u6784\u5e08\u6808              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u662fJava\u5c0f\u65cb\u98ce\uff01\u4eca\u5929\u7ed9\u5927\u5bb6\u5e26\u6765\u7a0b\u5e8f\u5458\u5fc5\u987b\u4e86\u89e3\u7684\u6d88\u606f\u961f\u5217\u4e4b\u738b-Kafka\u3002 1. Kafka\u6982\u8ff0 1.1 \u5b9a\u4e49 Kafk &#8230;<\/p>\n","protected":false},"author":1,"featured_media":2411,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[16],"tags":[],"class_list":["post-2419","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kafka"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154535942-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154538682.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154535942-300x127.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154535942.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154538682.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154535942-300x127.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154535942.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154535942.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154538682.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154538682.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154540476.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154540476.png","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154542188.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154542188.png","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154543568.png","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154543568.png","id":"image7"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154546918.png","id":"image8"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154546918.png","id":"image9"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154547495.png","id":"image10"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154547495.png","id":"image11"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154549887.png","id":"image12"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627154549887.png","id":"image13"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Kafka","post_date":"2023-06-29","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":332,"next_post_id":2898,"next_post_title":"SpringBoot \u96c6\u6210 Kafka \u914d\u7f6e","previous_post_id":2329,"previous_post_title":"springBoot\u5bf9\u63a5kafka,\u6279\u91cf\u3001\u5e76\u53d1\u3001\u5f02\u6b65\u83b7\u53d6\u6d88\u606f,\u5e76\u52a8\u6001\u3001\u6279\u91cf\u63d2\u5165\u5e93\u8868","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/2419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2419"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/2419\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/2411"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}