{"id":31578,"date":"2025-04-21T19:01:04","date_gmt":"2025-04-21T11:01:04","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/31578.html"},"modified":"2025-04-21T19:01:04","modified_gmt":"2025-04-21T11:01:04","slug":"%e6%9e%b6%e6%9e%84%e7%ac%ac113%e9%9b%86%ef%bc%9a%e7%bd%91%e5%85%b3%e6%9c%8d%e5%8a%a1%e5%99%a8%e3%80%81cassandra%e6%95%b0%e6%8d%ae%e5%ba%93%e3%80%81redis%e7%bc%93%e5%ad%98%e3%80%81kafka%e6%b6%88","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/31578.html","title":{"rendered":"\u67b6\u6784\u7b2c113\u96c6\uff1a\u7f51\u5173\u670d\u52a1\u5668\u3001Cassandra\u6570\u636e\u5e93\u3001Redis\u7f13\u5b58\u3001Kafka\u6d88\u606f\u961f\u5217\u3001Elasticsearch\u5ba2\u6237\u7aef"},"content":{"rendered":"<p style=\"text-align: left\">\u52a0\u7fa4\u8054\u7cfb\u4f5c\u8005vx&#xff1a;xiaoda0423<\/p>\n<p style=\"text-align: left\">\u4ed3\u5e93\u5730\u5740&#xff1a;https:\/\/webvueblog.github.io\/JavaPlusDoc\/<\/p>\n<p style=\"text-align: left\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"MIuSFi7nOp\"><p><a href=\"https:\/\/1024bat.cn\/\">Home<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"\u300a Home \u300b\u2014Jeskson\" src=\"https:\/\/1024bat.cn\/embed\/#?secret=9ALEws9VFR#?secret=MIuSFi7nOp\" data-secret=\"MIuSFi7nOp\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p style=\"text-align: left\">\u201c\u4e00\u4e2a\u57fa\u4e8e\u9501\u548c\u6761\u4ef6\u53d8\u91cf&#xff08;Condition&#xff09;\u5b9e\u73b0\u7684\u7b80\u6613\u7248 Future&#xff0c;\u7528\u6765\u5728\u67d0\u4e2a\u7ebf\u7a0b\u4e2d\u7b49\u5f85\u7ed3\u679c&#xff0c;\u76f4\u5230\u88ab\u53e6\u4e00\u4e2a\u7ebf\u7a0b\u663e\u5f0f\u5524\u9192\u5e76\u4f20\u9012\u7ed3\u679c\u3002\u201d<\/p>\n<p style=\"text-align: left\">&#x1f535;\u00a0\u4e3e\u4e2a\u7b80\u5355\u4f7f\u7528\u573a\u666f&#xff1a;<\/p>\n<p style=\"text-align: left\">\u5047\u8bbe\u4f60\u5728\u505a\u00a0\u5f02\u6b65RPC\u8c03\u7528\u3001\u5f02\u6b65\u6d88\u606f\u5904\u7406\u8fd9\u7c7b\u4e8b\u60c5&#xff1a;<\/p>\n<ul>\n<li>\n<p style=\"text-align: left\">\u7ebf\u7a0bA\u00a0\u53d1\u8d77\u8bf7\u6c42&#xff0c;\u4f46\u4e0d\u77e5\u9053\u4ec0\u4e48\u65f6\u5019\u7ed3\u679c\u8fd4\u56de&#xff0c;\u4e8e\u662f\u00a0await()\u00a0\u7b49\u5f85\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u5f53\u7ebf\u7a0bB\u00a0\u6536\u5230\u54cd\u5e94\u65f6&#xff0c;\u8c03\u7528\u00a0signal(result)\u00a0\u628a\u6570\u636e\u585e\u8fdb\u6765\u5e76\u5524\u9192\u7ebf\u7a0bA\u3002<\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align: left\">\u5c0f\u5c0f\u793a\u610f&#xff1a;<\/p>\n<p> CondFuture&lt;String&gt; condFuture &#061; new CondFuture&lt;&gt;();<\/p>\n<p>\/\/ \u7ebf\u7a0bA&#xff1a;\u8bf7\u6c42\u5e76\u7b49\u5f85<br \/>\nnew Thread(() -&gt; {<br \/>\n\u00a0 \u00a0 try {<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 String result &#061; condFuture.await(5, TimeUnit.SECONDS);<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 System.out.println(&#034;Got result: &#034;\u00a0&#043; result);<br \/>\n\u00a0 \u00a0 } catch (InterruptedException e) {<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 e.printStackTrace();<br \/>\n\u00a0 \u00a0 }<br \/>\n}).start();<\/p>\n<p>\/\/ \u7ebf\u7a0bB&#xff1a;\u7a0d\u540e\u54cd\u5e94<br \/>\nnew Thread(() -&gt; {<br \/>\n\u00a0 \u00a0 try {<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 Thread.sleep(1000); \/\/ \u5047\u88c5\u5904\u7406\u4e86 1\u79d2<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 condFuture.signal(&#034;Response is here!&#034;);<br \/>\n\u00a0 \u00a0 } catch (InterruptedException e) {<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 e.printStackTrace();<br \/>\n\u00a0 \u00a0 }<br \/>\n}).start(); <\/p>\n<p style=\"text-align: left\">\u8f93\u51fa&#xff1a;<\/p>\n<p> Got result: Response is here! <\/p>\n<p style=\"text-align: left\">\u6d41\u91cf\u3001\u9ad8\u5e76\u53d1 IoT \u9879\u76ee&#xff08;\u8f66\u8054\u7f51\u5e73\u53f0&#xff09;\u7684\u6807\u51c6\u5b9e\u8df5<\/p>\n<table>\n<tr>\n<p>\u4f18\u5316\u70b9<\/p>\n<p>\u8bf4\u660e<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>Cassandra \u5206\u5e93\u5206\u8282\u70b9<\/p>\n<\/td>\n<td>\n<p>xx\u3001xx\u3001\u4e1a\u52a1\u5e93\u5206\u5f00&#xff0c;\u51cf\u5c11\u70ed\u6570\u636e\u5e72\u6270&#xff0c;\u63d0\u5347\u67e5\u8be2\u6027\u80fd<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Redis \u4e3b\u5907\u5206\u79bb<\/p>\n<\/td>\n<td>\n<p>\u70ed\u6570\u636e\u5b9e\u65f6\u5b58\u50a8 &#043; \u5907\u4efd\u707e\u5bb9&#xff0c;\u5feb\u901f\u8bfb\u5199&#xff0c;\u51cf\u5c11\u5355\u70b9\u6545\u969c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Kafka producer\/batch \u914d\u7f6e<\/p>\n<\/td>\n<td>\n<p>\u6279\u91cf\u63d0\u4ea4&#xff0c;\u5ef6\u8fdf\u4f18\u5316&#xff0c;\u5185\u5b58\u7f13\u51b2\u63d0\u5347\u6d88\u606f\u53d1\u9001\u541e\u5410\u91cf<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Kafka consumer \u624b\u52a8ack &#043; concurrency<\/p>\n<\/td>\n<td>\n<p>\u4fdd\u8bc1\u6d88\u606f\u6d88\u8d39\u53ef\u9760\u6027&#xff0c;\u5e76\u901a\u8fc7\u591a\u7ebf\u7a0b\u52a0\u901f\u6d88\u8d39\u5904\u7406<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Elasticsearch restclient<\/p>\n<\/td>\n<td>\n<p>\u8f7b\u91cf\u9ad8\u6548&#xff0c;\u9002\u5408\u5927\u6570\u636e\u91cf\u68c0\u7d22&#xff0c;\u964d\u4f4eTCP\u8fde\u63a5\u5f00\u9500<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: left\">\u9ad8\u9636\u7248 JT808 \u5e73\u53f0\u670d\u52a1\u90e8\u7f72\u67b6\u6784\u56fe<\/p>\n<table>\n<tr>\n<p>\u6a21\u5757<\/p>\n<p>\u4f18\u5316\u7b56\u7565<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>JT808\u670d\u52a1<\/p>\n<\/td>\n<td>\n<p>Netty\u7ebf\u7a0b\u6a21\u578b&#043;\u5fc3\u8df3\u68c0\u6d4b&#043;\u8fc7\u671f\u5254\u9664<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Redis<\/p>\n<\/td>\n<td>\n<p>\u4e3b\u5907\u53cc\u5199&#xff0c;\u4e3b\u8282\u70b9\u6545\u969c\u5feb\u901f\u5207\u6362\u5907\u8282\u70b9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Cassandra<\/p>\n<\/td>\n<td>\n<p>\u6309\u4e1a\u52a1\u5206\u5e93&#xff0c;\u6570\u636e\u5206\u79bb&#xff0c;\u63d0\u5347\u67e5\u8be2\u6548\u7387<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Kafka<\/p>\n<\/td>\n<td>\n<p>\u6279\u91cf\u63d0\u4ea4&#043;\u5f02\u6b65ACK&#043;3\u8282\u70b9\u526f\u672c\u4fdd\u969c\u9ad8\u53ef\u7528<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Elasticsearch<\/p>\n<\/td>\n<td>\n<p>\u5f02\u6b65\u5199\u5165&#043;\u6279\u91cf\u63d0\u4ea4&#043;\u6162\u67e5\u8be2\u4f18\u5316<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u6d88\u8d39\u8005\u7ec4<\/p>\n<\/td>\n<td>\n<p>\u7ebf\u7a0b\u6c60\u6d88\u8d39&#xff0c;\u8d85\u65f6\u76d1\u63a7&#xff0c;\u91cd\u8bd5\u673a\u5236<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u8d85\u5b9e\u7528\u90e8\u7f72\u5efa\u8bae<\/h2>\n<table>\n<tr>\n<p>\u70b9\u4f4d<\/p>\n<p>\u5efa\u8bae<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>Redis<\/p>\n<\/td>\n<td>\n<p>\u4e3b\u5907\u8282\u70b9\u4f7f\u7528keepalived&#043;vip\u505a\u9ad8\u53ef\u7528\u5207\u6362<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Cassandra<\/p>\n<\/td>\n<td>\n<p>\u6bcf\u4e2a\u5e93\u5355\u72ec\u7ef4\u62a4\u8868&#xff0c;\u8bbe\u7f6e\u5408\u7406TTL&#xff08;\u8fc7\u671f\u65f6\u95f4&#xff09;\u6e05\u7406\u65e7\u6570\u636e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Kafka<\/p>\n<\/td>\n<td>\n<p>\u751f\u4ea7\u8005\u5f00\u542f\u5e42\u7b49\u6027 (enable.idempotence&#061;true)\u00a0&#xff0c;\u9632\u6b62\u91cd\u590d\u6295\u9012<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>ES<\/p>\n<\/td>\n<td>\n<p>\u70ed\u6570\u636e\u5206\u79bb&#xff0c;\u8001\u6570\u636e\u5b9a\u671f\u5f52\u6863&#xff0c;\u5199\u5165\u524d\u505aBulk\u538b\u7f29<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>JT808\u670d\u52a1\u5668<\/p>\n<\/td>\n<td>\n<p>\u589e\u52a0\u9632\u7c98\u5305\u62c6\u5305\u5904\u7406&#xff0c;\u6700\u5927\u5305\u957f\u6821\u9a8c&#xff0c;\u4fdd\u62a4\u7cfb\u7edf<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5168\u94fe\u8def<\/p>\n<\/td>\n<td>\n<p>\u63a5\u5165\u94fe\u8def\u8ffd\u8e2a\u7cfb\u7edf&#xff08;\u5982Skywalking\u3001Zipkin&#xff09;&#xff0c;\u76d1\u63a7\u6570\u636e\u6d41\u5411<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Topic\u5c5e\u6027\u8bbe\u7f6e\u5efa\u8bae&#xff08;\u91cd\u70b9&#xff01;&#xff09;<\/h2>\n<table>\n<tr>\n<p>\u5c5e\u6027<\/p>\n<p>\u5efa\u8bae\u503c<\/p>\n<p>\u89e3\u91ca<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>replication.factor<\/td>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>\u9632\u6b62\u8282\u70b9\u5b95\u673a\u4e22\u6570\u636e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>min.insync.replicas<\/td>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>\u5199\u5165\u5fc5\u987b\u81f3\u5c112\u526f\u672c\u6210\u529f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>acks<\/td>\n<td>\n<p>all<\/p>\n<\/td>\n<td>\n<p>\u751f\u4ea7\u8005\u7aef\u4fdd\u8bc1\u5f3a\u4e00\u81f4\u6027<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>enable.idempotence<\/td>\n<td>\n<p>true<\/p>\n<\/td>\n<td>\n<p>\u5f00\u542f\u5e42\u7b49\u6027&#xff0c;\u9632\u6b62\u91cd\u590d\u6d88\u606f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>retention.ms<\/td>\n<td>\n<p>7\u5929&#xff08;604800000&#xff09;\u6216\u6309\u4e1a\u52a1\u5b9a<\/p>\n<\/td>\n<td>\n<p>\u4fdd\u7559\u65f6\u95f4\u591f\u8865\u507f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>cleanup.policy<\/td>\n<td>\n<p>delete&#xff08;\u9ed8\u8ba4&#xff09;<\/p>\n<\/td>\n<td>\n<p>\u4fdd\u8bc1\u78c1\u76d8\u53ef\u63a7&#xff0c;\u907f\u514d\u81a8\u80c0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>segment.ms<\/td>\n<td>\n<p>1\u5c0f\u65f6<\/p>\n<\/td>\n<td>\n<p>\u5207\u5c0f\u65e5\u5fd7\u6bb5&#xff0c;\u63d0\u5347\u67e5\u8be2\u901f\u5ea6<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>&#x1f4cb; Kafka \u53c2\u6570\u8c03\u4f18\u8868&#xff08;\u8d85\u8be6\u7ec6\u7248&#xff09;<\/h2>\n<h3>&#x1f6e0;\ufe0f Producer \u53c2\u6570\u8c03\u4f18<\/h3>\n<table>\n<tr>\n<p>\u53c2\u6570<\/p>\n<p>\u5efa\u8bae\u914d\u7f6e<\/p>\n<p>\u4f5c\u7528\u89e3\u91ca<\/p>\n<p>\u8c03\u4f18\u601d\u8def<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>acks<\/td>\n<td>all<\/td>\n<td>\n<p>\u7b49\u6240\u6709\u526f\u672c\u786e\u8ba4\u624d\u7b97\u5199\u6210\u529f<\/p>\n<\/td>\n<td>\n<p>\u6700\u5f3a\u6570\u636e\u53ef\u9760\u6027<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>retries<\/td>\n<td>3 ~ 5<\/td>\n<td>\n<p>\u53d1\u9001\u5931\u8d25\u81ea\u52a8\u91cd\u8bd5\u6b21\u6570<\/p>\n<\/td>\n<td>\n<p>\u9632\u6b62\u77ac\u65f6\u6296\u52a8\u4e22\u6d88\u606f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>enable.idempotence<\/td>\n<td>true<\/td>\n<td>\n<p>\u5f00\u542f\u5e42\u7b49\u6027&#xff0c;\u907f\u514d\u91cd\u590d\u6295\u9012<\/p>\n<\/td>\n<td>\n<p>\u9ad8\u4e00\u81f4\u6027\u5fc5\u5f00<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>batch.size<\/td>\n<td>32KB ~ 64KB<\/td>\n<td>\n<p>\u5355\u6279\u6b21\u6700\u5927\u5b57\u8282\u6570<\/p>\n<\/td>\n<td>\n<p>\u8c03\u5927\u63d0\u9ad8\u541e\u5410\u91cf&#xff0c;\u51cf\u5c11IO\u6b21\u6570<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>linger.ms<\/td>\n<td>5 ~ 10<\/td>\n<td>\n<p>\u6279\u91cf\u53d1\u9001\u5ef6\u8fdf&#xff08;\u6beb\u79d2&#xff09;<\/p>\n<\/td>\n<td>\n<p>\u7a0d\u5fae\u5ef6\u8fdf\u6362\u66f4\u5927\u6279\u6b21&#xff08;\u51cf\u5c11\u538bKafka&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>buffer.memory<\/td>\n<td>64MB ~ 128MB<\/td>\n<td>\n<p>\u751f\u4ea7\u8005\u5185\u5b58\u7f13\u51b2\u6c60\u5927\u5c0f<\/p>\n<\/td>\n<td>\n<p>\u5185\u5b58\u5bcc\u88d5\u5c31\u8c03\u5927&#xff08;\u6297\u7a81\u53d1&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>compression.type<\/td>\n<td>lz4<\/p>\n<p>\u00a0\u6216\u00a0snappy<\/p>\n<\/td>\n<td>\n<p>\u538b\u7f29\u7b97\u6cd5<\/p>\n<\/td>\n<td>\n<p>\u964d\u4f4e\u7f51\u7edc\u5e26\u5bbd&#xff0c;\u63d0\u5347\u541e\u5410<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>max.request.size<\/td>\n<td>1MB<\/p>\n<p>\u00a0\u6216\u66f4\u5927<\/p>\n<\/td>\n<td>\n<p>\u5355\u6761\u6d88\u606f\u6700\u5927\u5c3a\u5bf8<\/p>\n<\/td>\n<td>\n<p>\u907f\u514d\u8d85\u5927\u6d88\u606f\u88ab\u62d2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>request.timeout.ms<\/td>\n<td>30s<\/td>\n<td>\n<p>\u8bf7\u6c42\u8d85\u65f6\u6beb\u79d2\u6570<\/p>\n<\/td>\n<td>\n<p>\u4fdd\u8bc1\u91cd\u8bd5\/\u5931\u8d25\u53ca\u65f6\u5207\u6362<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>delivery.timeout.ms<\/td>\n<td>60s<\/td>\n<td>\n<p>\u5141\u8bb8\u6700\u5927\u53d1\u9001\u65f6\u95f4<\/p>\n<\/td>\n<td>\n<p>\u914d\u5408 retries \u6548\u679c\u597d<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>&#x1f6e0;\ufe0f Consumer \u53c2\u6570\u8c03\u4f18<\/h3>\n<table>\n<tr>\n<p>\u53c2\u6570<\/p>\n<p>\u5efa\u8bae\u914d\u7f6e<\/p>\n<p>\u4f5c\u7528\u89e3\u91ca<\/p>\n<p>\u8c03\u4f18\u601d\u8def<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>fetch.min.bytes<\/td>\n<td>1KB ~ 10KB<\/td>\n<td>\n<p>\u6700\u5c0f\u6293\u53d6\u5b57\u8282<\/p>\n<\/td>\n<td>\n<p>\u6293\u53d6\u66f4\u591a\u6d88\u606f&#xff0c;\u51cf\u5c11\u62c9\u53d6\u6b21\u6570<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>fetch.max.bytes<\/td>\n<td>5MB ~ 10MB<\/td>\n<td>\n<p>\u5355\u6b21\u6700\u5927\u62c9\u53d6\u91cf<\/p>\n<\/td>\n<td>\n<p>\u5408\u7406\u62c9\u5927&#xff0c;\u9632\u6b62\u541e\u5410\u4f4e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>fetch.max.wait.ms<\/td>\n<td>500ms<\/td>\n<td>\n<p>\u6700\u957f\u7b49\u5f85\u65f6\u95f4<\/p>\n<\/td>\n<td>\n<p>\u914d\u5408 batch \u6d88\u8d39\u66f4\u6d41\u7545<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>max.poll.records<\/td>\n<td>500 ~ 1000<\/td>\n<td>\n<p>\u6bcf\u6b21\u62c9\u53d6\u6700\u5927\u8bb0\u5f55\u6570<\/p>\n<\/td>\n<td>\n<p>\u6279\u91cf\u5904\u7406\u63d0\u5347\u6548\u7387<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>session.timeout.ms<\/td>\n<td>10s ~ 20s<\/td>\n<td>\n<p>\u6d88\u8d39\u7ec4\u5fc3\u8df3\u8d85\u65f6\u65f6\u95f4<\/p>\n<\/td>\n<td>\n<p>\u4fdd\u6301\u5e73\u7a33Rebalance<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>heartbeat.interval.ms<\/td>\n<td>3s ~ 5s<\/td>\n<td>\n<p>\u5fc3\u8df3\u95f4\u9694<\/p>\n<\/td>\n<td>\n<p>\u914d\u5408session.timeout<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>enable.auto.commit<\/td>\n<td>false<\/td>\n<td>\n<p>\u5173\u95ed\u81ea\u52a8\u63d0\u4ea4<\/p>\n<\/td>\n<td>\n<p>\u624b\u52a8\u63a7\u5236 offset&#xff0c;\u786e\u4fdd\u7cbe\u786e\u4e00\u6b21<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>max.partition.fetch.bytes<\/td>\n<td>1MB<\/td>\n<td>\n<p>\u5355\u5206\u533a\u6700\u5927\u62c9\u53d6\u91cf<\/p>\n<\/td>\n<td>\n<p>\u9ad8\u5206\u533a\u573a\u666f\u8981\u8c03\u5927<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>&#x1f6e0;\ufe0f Broker \u96c6\u7fa4\u7aef\u53c2\u6570\u8c03\u4f18<\/h3>\n<table>\n<tr>\n<p>\u53c2\u6570<\/p>\n<p>\u5efa\u8bae\u914d\u7f6e<\/p>\n<p>\u4f5c\u7528\u89e3\u91ca<\/p>\n<p>\u8c03\u4f18\u601d\u8def<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>num.network.threads<\/td>\n<td>3 ~ 8<\/td>\n<td>\n<p>\u7f51\u7edc\u7ebf\u7a0b\u6570<\/p>\n<\/td>\n<td>\n<p>\u8ddfbroker\u6d41\u91cf\u91cf\u7ea7\u6709\u5173<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>num.io.threads<\/td>\n<td>8 ~ 16<\/td>\n<td>\n<p>IO\u7ebf\u7a0b\u6570&#xff08;\u78c1\u76d8\/\u7f51\u7edc&#xff09;<\/p>\n<\/td>\n<td>\n<p>\u8ddf\u78c1\u76d8\/\u541e\u5410\u76f8\u5173<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>log.dirs<\/td>\n<td>\n<p>\u591a\u78c1\u76d8\u6302\u8f7d<\/p>\n<\/td>\n<td>\n<p>\u65e5\u5fd7\u5b58\u50a8\u76ee\u5f55<\/p>\n<\/td>\n<td>\n<p>\u591a\u8def\u5f84\u5e76\u53d1\u5237\u76d8\u66f4\u5feb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>log.segment.bytes<\/td>\n<td>512MB ~ 1GB<\/td>\n<td>\n<p>\u5206\u6bb5\u6587\u4ef6\u5927\u5c0f<\/p>\n<\/td>\n<td>\n<p>\u6587\u4ef6\u8fc7\u5c0f\u5f71\u54cd\u6027\u80fd<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>log.retention.hours<\/td>\n<td>72h<\/p>\n<p>&#xff08;3\u5929&#xff09;\u6216\u6309\u9700<\/p>\n<\/td>\n<td>\n<p>\u65e5\u5fd7\u4fdd\u7559\u65f6\u95f4<\/p>\n<\/td>\n<td>\n<p>\u7ed3\u5408\u4e1a\u52a1\u5b9a\u7b56\u7565<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>message.max.bytes<\/td>\n<td>1MB<\/p>\n<p>\u00a0\u6216\u66f4\u5927<\/p>\n<\/td>\n<td>\n<p>\u5355\u6d88\u606f\u6700\u5927\u5b57\u8282\u6570<\/p>\n<\/td>\n<td>\n<p>\u8ddf producer \u7aef\u5bf9\u5e94<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>replica.fetch.max.bytes<\/td>\n<td>10MB<\/td>\n<td>\n<p>\u526f\u672c\u540c\u6b65\u6700\u5927\u5b57\u8282<\/p>\n<\/td>\n<td>\n<p>\u9632\u6b62\u526f\u672c\u843d\u540e\u592a\u591a<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>socket.request.max.bytes<\/td>\n<td>100MB<\/td>\n<td>\n<p>socket\u8bf7\u6c42\u6700\u5927\u5b57\u8282\u6570<\/p>\n<\/td>\n<td>\n<p>\u4fdd\u62a4broker\u9632\u6b62OOM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>auto.create.topics.enable<\/td>\n<td>false<\/td>\n<td>\n<p>\u7981\u6b62\u81ea\u52a8\u521b\u5efa topic<\/p>\n<\/td>\n<td>\n<p>\u7edf\u4e00topic\u7ba1\u7406<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u3010\u5b9e\u6218Tips\u3011<\/h2>\n<ul>\n<li>\n<p style=\"text-align: left\">\u541e\u5410\u4f18\u5148\u2192 \u8c03\u5927 batch.size\u3001buffer.memory&#xff0c;\u4f7f\u7528\u538b\u7f29\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u53ef\u9760\u6027\u4f18\u5148\u2192 \u5f00\u542f acks&#061;all\u3001\u5e42\u7b49\u3001\u5408\u7406\u8bbe\u7f6e retries\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u9ad8\u5e76\u53d1\u4f4e\u5ef6\u8fdf\u2192 \u5408\u7406\u8c03 max.poll.records\u3001fetch\u53c2\u6570\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u96c6\u7fa4\u5bb9\u707e\u2192 Replication Factor &#061; 3&#xff0c;ISR\u5217\u8868\u63a7\u5236\u597d&#xff08;min.insync.replicas&#061;2&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u5f02\u5e38\u5904\u7406\u2192 \u914d\u7f6e DLQ&#xff08;\u6b7b\u4fe1\u961f\u5217&#xff09;&#043; \u81ea\u5b9a\u4e49\u62e6\u622a\u5668&#xff08;\u5982 ProducerInterceptor \u6293\u5f02\u5e38&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<h2>&#x1f4cb; Kafka \u6d41\u91cf\u538b\u6d4b\u5de5\u5177\u63a8\u8350\u8868<\/h2>\n<h3>1. \u5b98\u65b9\u81ea\u5e26\u5de5\u5177 &#8211;\u00a0kafka-producer-perf-test.sh<\/h3>\n<h4>\u5de5\u5177\u4f4d\u7f6e<\/h4>\n<p style=\"text-align: left\">\u4e00\u822c\u5728\u5b89\u88c5\u5305\u91cc\u7684&#xff1a;<\/p>\n<p> $KAFKA_HOME\/bin\/kafka-producer-perf-test.sh <\/p>\n<h4>\u57fa\u7840\u4f7f\u7528\u793a\u4f8b<\/h4>\n<p> .\/kafka-producer-perf-test.sh \\\\<br \/>\n\u00a0 &#8211;topic\u00a0test-topic \\\\<br \/>\n\u00a0 &#8211;num-records 1000000 \\\\<br \/>\n\u00a0 &#8211;record-size 512 \\\\<br \/>\n\u00a0 &#8211;throughput -1 \\\\<br \/>\n\u00a0 &#8211;producer-props bootstrap.servers&#061;localhost:9092 <\/p>\n<table>\n<tr>\n<p>\u53c2\u6570<\/p>\n<p>\u8bf4\u660e<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>&#8211;topic<\/td>\n<td>\n<p>\u538b\u6d4b\u7528\u7684 Topic<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>&#8211;num-records<\/td>\n<td>\n<p>\u8981\u53d1\u9001\u7684\u6d88\u606f\u603b\u6570<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>&#8211;record-size<\/td>\n<td>\n<p>\u6bcf\u6761\u6d88\u606f\u5b57\u8282\u5927\u5c0f&#xff08;\u6bd4\u5982 JT808 \u6807\u51c6\u62a5\u6587\u4e00\u822c\u51e0\u5341\u5230\u51e0\u767e\u5b57\u8282&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>&#8211;throughput<\/td>\n<td>\n<p>\u9650\u6d41\u901f\u7387&#xff08;\u6761\u6570\/\u79d2&#xff09;&#xff0c;-1\u8868\u793a\u4e0d\u9650\u901f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>&#8211;producer-props<\/td>\n<td>\n<p>\u4f20\u5165Kafka Producer\u7684\u8fde\u63a5\u53c2\u6570<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: left\">\u2705 \u8f93\u51fa\u7ed3\u679c&#xff1a;TPS\u3001\u53d1\u9001\u5ef6\u8fdf\u3001\u541e\u5410\u91cf\u7b49\u6307\u6807<\/p>\n<hr \/>\n<h3>2. \u5b98\u65b9\u81ea\u5e26\u5de5\u5177 &#8211;\u00a0kafka-consumer-perf-test.sh<\/h3>\n<h4>\u57fa\u7840\u4f7f\u7528\u793a\u4f8b<\/h4>\n<p> .\/kafka-consumer-perf-test.sh \\\\<br \/>\n\u00a0 &#8211;topic\u00a0test-topic \\\\<br \/>\n\u00a0 &#8211;bootstrap-server localhost:9092 \\\\<br \/>\n\u00a0 &#8211;messages 1000000 <\/p>\n<table>\n<tr>\n<p>\u53c2\u6570<\/p>\n<p>\u8bf4\u660e<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>&#8211;topic<\/td>\n<td>\n<p>\u8981\u6d88\u8d39\u7684Topic<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>&#8211;messages<\/td>\n<td>\n<p>\u8981\u6d88\u8d39\u7684\u6d88\u606f\u6761\u6570<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>&#8211;bootstrap-server<\/td>\n<td>\n<p>Kafka\u5730\u5740<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: left\">\u2705 \u8f93\u51fa\u7ed3\u679c&#xff1a;\u6d88\u8d39TPS\u3001\u5e73\u5747\u5ef6\u8fdf\u3001\u541e\u5410\u91cf<\/p>\n<hr \/>\n<h2>&#x1f680; \u9ad8\u9636\u538b\u6d4b\u601d\u8def<\/h2>\n<table>\n<tr>\n<p>\u573a\u666f<\/p>\n<p>\u5de5\u5177<\/p>\n<p>\u5efa\u8bae\u64cd\u4f5c<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u5355\u673a\u5355Topic\u6700\u5927\u541e\u5410<\/p>\n<\/td>\n<td>\n<p>producer-perf-test.sh<\/p>\n<\/td>\n<td>\n<p>\u914d\u7f6e\u5927\u6279\u91cf\u6570\u636e\u3001-1\u4e0d\u9650\u901f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u591a\u5206\u533a\u538b\u6d4b<\/p>\n<\/td>\n<td>\n<p>producer-perf-test.sh<\/p>\n<\/td>\n<td>\n<p>\u591a\u5f00\u8fdb\u7a0b&#xff0c;\u53d1\u9001\u5230\u4e0d\u540c\u5206\u533a<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u538b\u6d4b\u96c6\u7fa4\u6d88\u8d39\u80fd\u529b<\/p>\n<\/td>\n<td>\n<p>consumer-perf-test.sh<\/p>\n<\/td>\n<td>\n<p>\u914d\u5408group.id\u5e76\u53d1\u6d88\u8d39<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u7f51\u7edc\/\u78c1\u76d8\u74f6\u9888\u6392\u67e5<\/p>\n<\/td>\n<td>\n<p>producer\/consumer &#043; Linux iostat\u3001sar<\/p>\n<\/td>\n<td>\n<p>\u89c2\u5bdf\u78c1\u76d8\/\u7f51\u7edcIO<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u7aef\u5230\u7aef\u5ef6\u8fdf\u538b\u6d4b<\/p>\n<\/td>\n<td>\n<p>\u81ea\u5b9a\u4e49\u5e26\u65f6\u95f4\u6233\u7684Payload<\/p>\n<\/td>\n<td>\n<p>\u751f\u4ea7&#043;\u6d88\u8d39\u540e\u8ba1\u7b97RTT<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>&#x1f525; \u9ad8\u9636\u6280\u5de7&#xff1a;\u914d\u5408\u8fd9\u4e9b\u4e00\u8d77\u538b\u6d4b\u66f4\u7a33<\/h2>\n<ul>\n<li>\n<p style=\"text-align: left\">\u8c03\u5927 Producer\u00a0batch.size\u3001linger.ms\u00a0\u2192 \u6279\u91cf\u53d1<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">Broker\u00a0socket.request.max.bytes\u8c03\u5927 \u2192 \u9632\u6b62\u5927\u6279\u6b21\u5931\u8d25<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u4fdd\u8bc1\u78c1\u76d8I\/O\u591f\u5feb&#xff08;SSD\u6700\u4f73&#xff09;<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">JVM \u53c2\u6570\u4f18\u5316&#xff08;-Xms -Xmx\u56fa\u5b9a\u5806\u5927\u5c0f&#xff09;<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u914d\u7f6e Topic \u5206\u533a\u6570\u3001Replication Factor\u5408\u7406\u5206\u644a\u538b\u529b<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h2>&#x1f4c8; \u5b9e\u6218Tips\u603b\u7ed3<\/h2>\n<ul>\n<li>\n<p style=\"text-align: left\">\u5c0f\u6d88\u606f&#xff08;\u5982JT808\u4f4d\u7f6e\u4e0a\u62a5&#xff09;\u2192\u00a0\u9ad8TPS\u00a0\u538b\u6d4b\u91cd\u70b9<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u5927\u6d88\u606f&#xff08;\u62a5\u8b66\/\u591a\u5a92\u4f53&#xff09;\u2192\u00a0\u541e\u5410\u91cf\/\u5ef6\u8fdf\u00a0\u53cc\u538b\u6d4b<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u6d88\u8d39\u7aef\u4e00\u5b9a\u8981\u538b \u2192 \u907f\u514d\u53ea\u6d4b\u53d1\u9001\u5ffd\u7565\u6d88\u8d39\u74f6\u9888&#xff01;<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb802\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf18\u6b21\u3002\u2192 Replication Factor = 3\uff0cISR\u5217\u8868\u63a7\u5236\u597d\uff08min.insync.replicas=2\uff09\u3002\u2192 \u914d\u7f6e DLQ\uff08\u6b7b\u4fe1\u961f\u5217\uff09+ \u81ea\u5b9a\u4e49\u62e6\u622a\u5668\uff08\u5982 ProducerInterceptor \u6293\u5f02\u5e38\uff09\u3002\uff09\u5b9e\u73b0\u7684\u7b80\u6613\u7248 Future\uff0c\u7528\u6765\u5728\u67d0\u4e2a\u7ebf\u7a0b\u4e2d\u7b49\u5f85\u7ed3\u679c\uff0c\u76f4\u5230\u88ab\u53e6\u4e00\u4e2a\u7ebf\u7a0b\u663e\u5f0f\u5524\u9192\u5e76\u4f20\u9012\u7ed3\u679c\u3002\u2192 \u8c03\u5927 batch.size\u3001buffer.memory\uff0c\u4f7f\u7528\u538b\u7f29\u3002\u2192 \u5408\u7406\u8c03 max.poll.records\u3001fetch\u53c2\u6570\u3002xx\u3001xx\u3001\u4e1a\u52a1\u5e93\u5206\u5f00\uff0c\u51cf\u5c11\u70ed\u6570\u636e\u5e72\u6270\uff0c\u63d0\u5347\u67e5\u8be2\u6027\u80fd\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[105,100,43,188,398],"topic":[],"class_list":["post-31578","post","type-post","status-publish","format-standard","hentry","category-server","tag-redis","tag-100","tag-43","tag-188","tag-398"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u67b6\u6784\u7b2c113\u96c6\uff1a\u7f51\u5173\u670d\u52a1\u5668\u3001Cassandra\u6570\u636e\u5e93\u3001Redis\u7f13\u5b58\u3001Kafka\u6d88\u606f\u961f\u5217\u3001Elasticsearch\u5ba2\u6237\u7aef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/31578.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u67b6\u6784\u7b2c113\u96c6\uff1a\u7f51\u5173\u670d\u52a1\u5668\u3001Cassandra\u6570\u636e\u5e93\u3001Redis\u7f13\u5b58\u3001Kafka\u6d88\u606f\u961f\u5217\u3001Elasticsearch\u5ba2\u6237\u7aef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb802\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf18\u6b21\u3002\u2192 Replication Factor = 3\uff0cISR\u5217\u8868\u63a7\u5236\u597d\uff08min.insync.replicas=2\uff09\u3002\u2192 \u914d\u7f6e DLQ\uff08\u6b7b\u4fe1\u961f\u5217\uff09+ \u81ea\u5b9a\u4e49\u62e6\u622a\u5668\uff08\u5982 ProducerInterceptor \u6293\u5f02\u5e38\uff09\u3002\uff09\u5b9e\u73b0\u7684\u7b80\u6613\u7248 Future\uff0c\u7528\u6765\u5728\u67d0\u4e2a\u7ebf\u7a0b\u4e2d\u7b49\u5f85\u7ed3\u679c\uff0c\u76f4\u5230\u88ab\u53e6\u4e00\u4e2a\u7ebf\u7a0b\u663e\u5f0f\u5524\u9192\u5e76\u4f20\u9012\u7ed3\u679c\u3002\u2192 \u8c03\u5927 batch.size\u3001buffer.memory\uff0c\u4f7f\u7528\u538b\u7f29\u3002\u2192 \u5408\u7406\u8c03 max.poll.records\u3001fetch\u53c2\u6570\u3002xx\u3001xx\u3001\u4e1a\u52a1\u5e93\u5206\u5f00\uff0c\u51cf\u5c11\u70ed\u6570\u636e\u5e72\u6270\uff0c\u63d0\u5347\u67e5\u8be2\u6027\u80fd\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/31578.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-21T11:01:04+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/31578.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/31578.html\",\"name\":\"\u67b6\u6784\u7b2c113\u96c6\uff1a\u7f51\u5173\u670d\u52a1\u5668\u3001Cassandra\u6570\u636e\u5e93\u3001Redis\u7f13\u5b58\u3001Kafka\u6d88\u606f\u961f\u5217\u3001Elasticsearch\u5ba2\u6237\u7aef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-21T11:01:04+00:00\",\"dateModified\":\"2025-04-21T11:01:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/31578.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/31578.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/31578.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u67b6\u6784\u7b2c113\u96c6\uff1a\u7f51\u5173\u670d\u52a1\u5668\u3001Cassandra\u6570\u636e\u5e93\u3001Redis\u7f13\u5b58\u3001Kafka\u6d88\u606f\u961f\u5217\u3001Elasticsearch\u5ba2\u6237\u7aef\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u67b6\u6784\u7b2c113\u96c6\uff1a\u7f51\u5173\u670d\u52a1\u5668\u3001Cassandra\u6570\u636e\u5e93\u3001Redis\u7f13\u5b58\u3001Kafka\u6d88\u606f\u961f\u5217\u3001Elasticsearch\u5ba2\u6237\u7aef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/31578.html","og_locale":"zh_CN","og_type":"article","og_title":"\u67b6\u6784\u7b2c113\u96c6\uff1a\u7f51\u5173\u670d\u52a1\u5668\u3001Cassandra\u6570\u636e\u5e93\u3001Redis\u7f13\u5b58\u3001Kafka\u6d88\u606f\u961f\u5217\u3001Elasticsearch\u5ba2\u6237\u7aef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb802\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf18\u6b21\u3002\u2192 Replication Factor = 3\uff0cISR\u5217\u8868\u63a7\u5236\u597d\uff08min.insync.replicas=2\uff09\u3002\u2192 \u914d\u7f6e DLQ\uff08\u6b7b\u4fe1\u961f\u5217\uff09+ \u81ea\u5b9a\u4e49\u62e6\u622a\u5668\uff08\u5982 ProducerInterceptor \u6293\u5f02\u5e38\uff09\u3002\uff09\u5b9e\u73b0\u7684\u7b80\u6613\u7248 Future\uff0c\u7528\u6765\u5728\u67d0\u4e2a\u7ebf\u7a0b\u4e2d\u7b49\u5f85\u7ed3\u679c\uff0c\u76f4\u5230\u88ab\u53e6\u4e00\u4e2a\u7ebf\u7a0b\u663e\u5f0f\u5524\u9192\u5e76\u4f20\u9012\u7ed3\u679c\u3002\u2192 \u8c03\u5927 batch.size\u3001buffer.memory\uff0c\u4f7f\u7528\u538b\u7f29\u3002\u2192 \u5408\u7406\u8c03 max.poll.records\u3001fetch\u53c2\u6570\u3002xx\u3001xx\u3001\u4e1a\u52a1\u5e93\u5206\u5f00\uff0c\u51cf\u5c11\u70ed\u6570\u636e\u5e72\u6270\uff0c\u63d0\u5347\u67e5\u8be2\u6027\u80fd\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/31578.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-21T11:01:04+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/31578.html","url":"https:\/\/www.wsisp.com\/helps\/31578.html","name":"\u67b6\u6784\u7b2c113\u96c6\uff1a\u7f51\u5173\u670d\u52a1\u5668\u3001Cassandra\u6570\u636e\u5e93\u3001Redis\u7f13\u5b58\u3001Kafka\u6d88\u606f\u961f\u5217\u3001Elasticsearch\u5ba2\u6237\u7aef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-21T11:01:04+00:00","dateModified":"2025-04-21T11:01:04+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/31578.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/31578.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/31578.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u67b6\u6784\u7b2c113\u96c6\uff1a\u7f51\u5173\u670d\u52a1\u5668\u3001Cassandra\u6570\u636e\u5e93\u3001Redis\u7f13\u5b58\u3001Kafka\u6d88\u606f\u961f\u5217\u3001Elasticsearch\u5ba2\u6237\u7aef"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/31578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=31578"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/31578\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=31578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=31578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=31578"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=31578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}