{"id":47245,"date":"2023-05-02T20:14:15","date_gmt":"2022-11-27T22:14:04","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/"},"modified":"2024-04-30T02:19:04","modified_gmt":"2024-04-29T18:19:04","slug":"%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/","title":{"rendered":"\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300cApache Pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09"},"content":{"rendered":"<blockquote><p>\u901a\u8fc7\u83b7\u5f97\u516c\u53f8\u8bb8\u53ef\uff0c\u6211\u5c06\u6295\u7a3f\u7ed9Yahoo! JAPAN\u6280\u672f\u535a\u5ba2\u7684\u6587\u7ae0\u8f6c\u8f7d\u5230\u8fd9\u91cc\u3002<br \/>\nApache Pulsar\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09- Yahoo! JAPAN\u6280\u672f\u535a\u5ba2<\/p><\/blockquote>\n<p>\u4f60\u597d\u3002\u6211\u662f\u96c5\u864e\u80a1\u4efd\u6709\u9650\u516c\u53f8\u7cfb\u7edf\u603b\u62ec\u672c\u90e8\u4e91\u5e73\u53f0\u672c\u90e8\u7684\u6c34\u5c9b\u3002\u76ee\u524d\u6211\u6240\u5c5e\u7684\u56e2\u961f\u81f4\u529b\u4e8e\u4e3a\u516c\u53f8\u5185\u90e8\u63d0\u4f9b\u6392\u961f\u3001\u53d1\u5e03-\u8ba2\u9605\u3001\u6d41\u5f0f\u5904\u7406\u7b49\u6d88\u606f\u5e73\u53f0\u3002<\/p>\n<p>\u5728\u8fd9\u4e2a\u56e2\u961f\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u5f00\u6e90\u8f6f\u4ef6Apache Pulsar\uff08\u4ee5\u4e0b\u7b80\u79f0Pulsar\uff09\u4f5c\u4e3a\u6d88\u606f\u5e73\u53f0\u3002\u56e2\u961f\u5df2\u7ecf\u5f00\u53d1\u548c\u8fd0\u8425Pulsar\u6570\u5e74\uff0c\u5e76\u79ef\u7d2f\u4e86\u4e30\u5bcc\u7684\u7ecf\u9a8c\u3002\u6211\u4eec\u5e0c\u671b\u5206\u4eab\u8fd9\u4e9b\u7ecf\u9a8c\uff0c\u5e76\u5e0c\u671b\u5927\u5bb6\u5bf9Pulsar\u4ea7\u751f\u5174\u8da3\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u51b3\u5b9a\u4ee5\u7cfb\u5217\u6587\u7ae0\u7684\u5f62\u5f0f\u53d1\u5e03Pulsar\u7684\u7528\u6cd5\u3001\u8fd0\u8425\u65b9\u6cd5\u4ee5\u53ca\u5728Yahoo\u7684\u6848\u4f8b\u7b49\u5185\u5bb9\u3002\u4e0d\u4ec5\u9650\u4e8e\u672c\u6587\uff0c\u6211\u4eec\u4e5f\u5e0c\u671b\u60a8\u80fd\u9605\u8bfb\u6211\u4eec\u4eca\u540e\u9884\u8ba1\u53d1\u5e03\u7684\u6587\u7ae0\u3002<\/p>\n<p>\u597d\u5427\uff0c\u8fd9\u6b21\u662f\u8fde\u8f7d\u7684\u7b2c\u4e00\u56de\uff0c\u6240\u4ee5\u6211\u5c06\u4ee5&#8221;\u8109\u51b2\u661f\u5165\u95e8&#8221;\u4e3a\u9898\uff0c\u5927\u81f4\u4ecb\u7ecd\u4ee5\u4e0b\u4e24\u70b9\u5185\u5bb9\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Pulsar\u306e\u57fa\u672c\u7684\u306a\u89e3\u8aac<\/ul>\n<\/li>\n<\/ul>\n<p>\u3055\u307e\u3056\u307e\u306a\u6a5f\u80fd<br \/>\nPulsar\u3092\u69cb\u6210\u3059\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/p>\n<p>Pulsar\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/p>\n<p>\u7c21\u6613\u7684\u306a\u30b5\u30fc\u30d0\u30fc\u8d77\u52d5<br \/>\n\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u5b9f\u884c<\/p>\n<h2>\u5728Yahoo\u5185\u90e8\u5bf9Pulsar\u7684\u5229\u7528\u60c5\u51b5<\/h2>\n<p>\u6211\u6240\u5728\u7684\u56e2\u961f\u81ea2016\u5e749\u6708\u5de6\u53f3\u5f00\u59cb\u53c2\u4e0e\u5c06Pulsar\u5f00\u6e90\u5316\u7684\u5de5\u4f5c\uff0c\u540c\u65f6\u4e5f\u6709\u591a\u540d\u6210\u5458\u62c5\u4efbPulsar\u7684\u6838\u5fc3\u5f00\u53d1\u8005\u3002\u9664\u4e86\u5728\u516c\u53f8\u5185\u90e8\u7a33\u5b9a\u5730\u8fd0\u8425Pulsar\uff0c\u4ee5\u4fbf\u7528\u6237\u80fd\u591f\u6301\u7eed\u4f7f\u7528\u5916\uff0c\u6211\u4eec\u8fd8\u901a\u8fc7\u6839\u636e\u516c\u53f8\u5185\u90e8\u9700\u6c42\u548c\u6848\u4f8b\u8fdb\u884c\u529f\u80fd\u6269\u5c55\u3001\u9519\u8bef\u4fee\u590d\u7b49\u5f00\u53d1\u5de5\u4f5c\uff0c\u79ef\u6781\u8d21\u732e\u4e8e\u5f00\u6e90\u793e\u533a\u3002<\/p>\n<p>\u901a\u8fc7\u5185\u90e8\u4ea7\u54c1\u4f7f\u7528\u5728\u8fd9\u91cc\u8fd0\u8425\u7684Pulsar\uff0c\u5f00\u53d1\u4ea7\u54c1\u7684\u5de5\u7a0b\u5e08\u5c06\u4e0d\u518d\u9700\u8981\u5355\u72ec\u8fd0\u8425\u6d88\u606f\u5e73\u53f0\u3002\u7ed3\u679c\uff0c\u4ea7\u54c1\u53ef\u4ee5\u4e13\u6ce8\u4e8e\u63d0\u4f9b\u672c\u5e94\u63d0\u4f9b\u7684\u670d\u52a1\u548c\u76f8\u5e94\u7684\u7528\u6237\u4ef7\u503c\u521b\u9020\u3002\u6709\u5173\u96c5\u864e\u548cPulsar\u7684\u5173\u7cfb\uff0c\u8bf7\u53c2\u9605\u6211\u4eec\u6700\u8fd1\u53d1\u5e03\u7684\u53e6\u4e00\u7bc7\u6587\u7ae0\u3002<\/p>\n<ul class=\"post-ul\">Message Queue\u3092\u793e\u5185\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3068\u3057\u3066\u63d0\u4f9b\u3057\u3066\u307f\u305f \u301c Apache Pulsar\u6d3b\u7528\u4e8b\u4f8b \u301c<\/ul>\n<h2>\u57fa\u672c\u7684\u77e5\u8b58<\/h2>\n<p>\u5728\u5bf9Pulsar\u8fdb\u884c\u89e3\u91ca\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u89e3\u91ca\u4e00\u4e0b\u5728\u6d88\u606f\u4f20\u9012\u7cfb\u7edf\u4e2d\u4f7f\u7528\u7684\u672f\u8bed\u4ee5\u53caPulsar\u4e2d\u4f7f\u7528\u7684\u672f\u8bed\u3002<\/p>\n<h3>\u751f\u4ea7\u8005\/\u6d88\u8d39\u8005<\/h3>\n<p>\u5236\u4f5c\u4eba\u662f\u6d88\u606f\u7684\u53d1\u9001\u65b9\uff0c\u6d88\u8d39\u8005\u662f\u6d88\u606f\u7684\u63a5\u6536\u65b9\u3002\u5728Pub-Sub\u6d88\u606f\u4f20\u9012\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u5c06\u5b83\u4eec\u5206\u522b\u79f0\u4e3a\u53d1\u5e03\u8005\/\u8ba2\u9605\u8005\u3002\u5728Pulsar\u4e2d\uff0c\u8fd9\u4e9b\u672f\u8bed\u4e5f\u88ab\u7528\u4e8e\u76f8\u540c\u7684\u610f\u601d\u3002\u6d88\u606f\u4f20\u9012\u7cfb\u7edf\u63a5\u6536\u6765\u81ea\u751f\u4ea7\u8005\u7684\u6d88\u606f\u5e76\u5c06\u5176\u53d1\u9001\u7ed9\u6d88\u8d39\u8005\uff08\u6216\u6d88\u8d39\u8005\u63a5\u6536\uff09\u3002\u8fd9\u5206\u522b\u88ab\u79f0\u4e3aProduce \/ Consume\u6216Publish \/ Subscribe\u3002<\/p>\n<p>\u901a\u8fc7\u6d88\u606f\u4f20\u9012\u7cfb\u7edf\u7684\u4e2d\u7ee7\uff0c\u53ef\u4ee5\u671f\u671b\u53d1\u9001\u65b9\u7cfb\u7edf\u548c\u63a5\u6536\u65b9\u7cfb\u7edf\u7684\u89e3\u8026\u3002<\/p>\n<h3>\u627f\u79df\u8005\/\u547d\u540d\u7a7a\u95f4\/\u4e3b\u9898\/\u8ba2\u9605<\/h3>\n<p>Pulsar\u5bf9\u5e38\u7528\u7684\u6d88\u606f\u4f20\u9012\u7cfb\u7edf\u8fdb\u884c\u4e86\u66f4\u6df1\u5c42\u6b21\u7684\u5206\u5c42\uff0c\u5e76\u5177\u6709\u81ea\u5df1\u7684\u672f\u8bed\u548c\u542b\u4e49\u3002\u56fe1\u5c55\u793a\u4e86\u5b83\u4eec\u4e4b\u95f4\u7684\u5927\u81f4\u5d4c\u5957\u5173\u7cfb\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7d40913a08637a69f434\/16-0.png\" alt=\"pulsar_topics_tree.png\" \/><\/div>\n<p>\u9996\u5148\uff0c\u5c06\u8bdd\u9898\u89c6\u4e3a\u4ea7\u751f\/\u6d88\u8d39\u6d88\u606f\u65f6\u7684\u7ec8\u70b9\u3002\u5176\u6b21\uff0c\u547d\u540d\u7a7a\u95f4\u662f\u6307\u5c06\u8bdd\u9898\u6346\u7ed1\u5728\u4e00\u8d77\u7684\u7a7a\u95f4\u3002\u901a\u8fc7\u5728\u547d\u540d\u7a7a\u95f4\u5355\u4f4d\u4e0a\u4e3a\u8bdd\u9898\u8bbe\u7f6e\u6743\u9650\u548c\u9650\u5236\u7b49\u914d\u7f6e\uff0c\u53ef\u4ee5\u8f7b\u677e\u7ba1\u7406\u8bdd\u9898\u3002\u518d\u6b21\uff0c\u79df\u6237\u662f\u6307\u6346\u7ed1\u547d\u540d\u7a7a\u95f4\u7684\u7a7a\u95f4\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u5728Pulsar\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u5f62\u5f0f\u6307\u5b9a\u6d88\u606f\u53d1\u9001\u548c\u63a5\u6536\u7684\u7ec8\u7aef\uff0c\u5373\u4e3b\u9898\u3002<\/p>\n<pre class=\"post-pre\"><code>persistent:\/\/${\u30c6\u30ca\u30f3\u30c8}\/${\u30cd\u30fc\u30e0\u30b9\u30da\u30fc\u30b9}\/${\u30c8\u30d4\u30c3\u30af}\r\n<\/code><\/pre>\n<p>\u6700\u540e\uff0c&#8221;\u8ba2\u9605&#8221;\u662f\u6d88\u8d39\u8005\u5728\u6d88\u8d39\u4e3b\u9898\u65f6\u4f7f\u7528\u7684\u6807\u8bc6\u7b26\u3002\u56fe2\u5c55\u793a\u4e86\u6d88\u606f\u548c\u8ba2\u9605\u4e4b\u95f4\u7684\u5173\u7cfb\u3002\u901a\u8fc7\u6307\u5b9a\u7279\u5b9a\u7684\u8ba2\u9605\uff0c\u6d88\u8d39\u8005\u53ef\u4ee5\u7ba1\u7406\u6d88\u606f\u7684\u6d88\u8d39\u8fdb\u5ea6\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7d40913a08637a69f434\/21-0.png\" alt=\"pulsar_subscription.png\" \/><\/div>\n<h2>Pulsar\u7684\u529f\u80fd<\/h2>\n<p>Pulsar\u62e5\u6709\u57fa\u672c\u529f\u80fd\u548c\u9ad8\u7ea7\u529f\u80fd\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u6311\u9009\u4e00\u4e9b\u8fdb\u884c\u4ecb\u7ecd\u3002<\/p>\n<h3>Pulsar\u7684\u57fa\u672c\u529f\u80fd<\/h3>\n<p>\u4f5c\u4e3aPulsar\u7684\u57fa\u672c\u529f\u80fd\uff0c\u53ef\u4ee5\u5217\u4e3e\u4ee5\u4e0b\u4e8b\u9879\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u6c34\u5e73\u30b9\u30b1\u30fc\u30eb\u53ef\u80fd<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u4f4e\u30ec\u30a4\u30c6\u30f3\u30b7<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30de\u30eb\u30c1\u30c6\u30ca\u30f3\u30b7\u30fc<\/ul>\n<\/li>\n<\/ul>\n<p>\u30b7\u30b9\u30c6\u30e0\u3084\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306a\u3069\u3092\u8907\u6570\u306e\u5229\u7528\u8005\u3067\u5171\u6709\u3057\u3066\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306a\u8a2d\u8a08\u30fb\u69cb\u9020\u3067\u3042\u308b\u3053\u3068<\/p>\n<p>\u6c38\u7d9a\u30e1\u30c3\u30bb\u30fc\u30b8<br \/>\n\u914d\u4fe1\u4fdd\u8a3c<\/p>\n<p>\u5728\u4f7f\u7528\u65b9\u9762\uff0c\u7279\u522b\u662f\u5728\u6c34\u5e73\u6269\u5c55\u65b9\u9762\u5177\u6709\u53ef\u6269\u5c55\u6027\u7684\u7279\u70b9\uff0c\u901a\u8fc7\u7b80\u5355\u5730\u589e\u52a0\u670d\u52a1\u5668\u53ef\u4ee5\u63d0\u9ad8\u96c6\u7fa4\u7684\u5904\u7406\u6027\u80fd\u3002\u4e3a\u4ec0\u4e48\u6c34\u5e73\u6269\u5c55\u5bb9\u6613\u7684\u539f\u56e0\u5c06\u5728\u540e\u9762\u7684\u67b6\u6784\u90e8\u5206\u8fdb\u884c\u89e3\u91ca\u3002\u5728\u5229\u7528\u65b9\u9762\uff0c\u7279\u522b\u662f\u5728\u591a\u79df\u6237\u65b9\u9762\u5177\u6709\u7279\u70b9\uff0c\u91c7\u7528\u4e86\u53ef\u4ee5\u4e0e\u591a\u4e2a\u7528\u6237\u5171\u4eab\u4f7f\u7528\u7684\u8bbe\u8ba1\u548c\u7ed3\u6784\u3002\u5b9e\u9645\u4e0a\uff0c\u8fd9\u662f\u901a\u8fc7\u79df\u6237\u7ba1\u7406\u5458\u80fd\u591f\u7ba1\u7406\u5176\u4e0b\u7684\u547d\u540d\u7a7a\u95f4\uff0c\u5e76\u8bbe\u7f6e\u53ef\u5bf9\u547d\u540d\u7a7a\u95f4\u7684\u6240\u6709\u4e3b\u9898\u8fdb\u884cProduce\/Consume\u7684\u6743\u9650\u7b49\u5b9e\u73b0\u7684\u3002<\/p>\n<h3>\u8109\u51b2\u661f\u7684\u8fdb\u5316\u529f\u80fd<\/h3>\n<p>\u6211\u5c06\u4ecb\u7ecd\u4e00\u4e9bPulsar\u7684\u8fdb\u9636\u529f\u80fd\u3002<\/p>\n<h4>\u8ba2\u9605\u7c7b\u578b<\/h4>\n<p>\u524d\u9762\u63d0\u5230\u7684\u8ba2\u9605\u6709\u51e0\u79cd\u7c7b\u578b\u3002\u76ee\u524d\uff08Pulsar v2.5.0\uff09\u6709\u72ec\u5360\u3001\u6545\u969c\u8f6c\u79fb\u3001\u5171\u4eab\u3001\u952e\u5171\u4eab\u56db\u79cd\u7c7b\u578b\uff0c\u5b83\u4eec\u5206\u522b\u5177\u6709\u4ee5\u4e0b\u529f\u80fd\uff1a<\/p>\n<p>Exclusive<\/p>\n<p>1\u3064\u306e\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u30921\u3064\u306eConsumer\u3060\u3051\u304cConsume\u3067\u304d\u308b<\/p>\n<p>Failover<\/p>\n<p>1\u3064\u306e\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u306b\u8907\u6570\u306eConsumer\u304c\u63a5\u7d9a\u3067\u304d\u308b<br \/>\n\u6700\u3082\u512a\u5148\u5ea6\u306e\u9ad8\u3044Consumer\u3060\u3051\u304cConsume\u3067\u304d\u308b\u304c\u3001\u3053\u306eConsumer\u304c\u30c0\u30a6\u30f3\u3057\u305f\u3068\u304d\u6b21\u306e\u512a\u5148\u5ea6\u306eConsumer\u304cConsume\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b<\/p>\n<p>Shared<\/p>\n<p>1\u3064\u306e\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u3092\u8907\u6570\u306eConsumer\u304cConsume\u3067\u304d\u308b<br \/>\n\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u30e9\u30a6\u30f3\u30c9\u30ed\u30d3\u30f3\u306b\u8fd1\u3044\u5f62\u3067Consumer\u306b\u914d\u4fe1\u3055\u308c\u308b<\/p>\n<p>Key_Shared<\/p>\n<p>1\u3064\u306e\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u3092\u8907\u6570\u306eConsumer\u304cConsume\u3067\u304d\u308b<br \/>\nProducer\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u306bKey\u3068\u547c\u3070\u308c\u308b\u8b58\u5225\u5b50\u3092\u4ed8\u4e0e\u3057\u3066\u3001\u540c\u3058Key\u3092\u6301\u3064\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u540c\u3058Consumer\u306b\u914d\u4fe1\u3055\u308c\u308b<br \/>\n\u540c\u3058Key\u3092\u6301\u3064\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u9806\u5e8f\u4fdd\u8a3c\u304c\u3067\u304d\u308b<\/p>\n<p>\u901a\u8fc7\u8fd9\u4e9b\uff0c\u53ea\u9700\u5f15\u5165Pulsar\u5c31\u80fd\u6ee1\u8db3\u6d88\u606f\u4f20\u9012\u7cfb\u7edf\u7684\u591a\u4e2a\u9700\u6c42\u3002<\/p>\n<h4>\u901a\u8fc7\u4f7f\u7528\u591a\u4e2a\u670d\u52a1\u5668\u6765\u63d0\u9ad8\u8bdd\u9898\u5904\u7406\u80fd\u529b (\u5206\u533a\u8bdd\u9898)<\/h4>\n<p>Pulsar\u5e38\u89c4\u60c5\u51b5\u4e0b\uff0c\u4e00\u4e2a\u4e3b\u9898\u901a\u8fc7\u4e00\u4e2aBroker\u670d\u52a1\u5668\u6765\u5904\u7406\uff08Broker\u662fPulsar\u7684\u7ec4\u4ef6\uff0c\u8d1f\u8d23Producer\u548cConsumer\u7684\u6d88\u606f\u53d1\u9001\u548c\u63a5\u6536\u3002\u8be6\u7ec6\u5185\u5bb9\u89c1\u540e\u6587\uff09\u3002\u8fd9\u610f\u5473\u7740\uff0c\u5bf9\u4e8e\u4e3b\u9898\u7684\u751f\u4ea7\/\u6d88\u8d39\u5904\u7406\u80fd\u529b\u4e0d\u4f1a\u8d85\u8fc7\u4e00\u4e2aBroker\u670d\u52a1\u5668\u7684\u6027\u80fd\u3002\u800c\u5206\u533a\u4e3b\u9898\u53ef\u4ee5\u5c06\u4e3b\u9898\u4f5c\u4e3a\u591a\u4e2a\u5185\u90e8\u4e3b\u9898\uff08\u901a\u5e38\u4e3b\u9898\u7684\u96c6\u5408\uff09\u6765\u5904\u7406\uff0c\u901a\u8fc7\u591a\u4e2aBroker\u5904\u7406\u5185\u90e8\u4e3b\u9898\uff0c\u53ef\u4ee5\u63d0\u9ad8\u5bf9\u4e3b\u9898\u7684\u5904\u7406\u80fd\u529b\u3002\u6b64\u5916\uff0cProducer\/Consumer\u53ef\u4ee5\u4f7f\u7528\u4e0e\u5e38\u89c4\u4e3b\u9898\u76f8\u540c\u7684\u63a5\u53e3\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<p>\u8bf7\u53c2\u8003\u56fe3\uff0c\u8be5\u56fe\u5c55\u793a\u4e86\u5206\u533a\u4e3b\u9898\u7684\u6982\u5ff5\u3002\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u8bf7\u89c1\u4e0b\u65b9\u94fe\u63a5\u3002<\/p>\n<ul class=\"post-ul\">Partitioned Topics<\/ul>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7d40913a08637a69f434\/38-0.png\" alt=\"pulsar_partitioned_topics.png\" \/><\/div>\n<h4>\u8de8\u96c6\u7fa4\u590d\u5236 (\u5730\u7406\u590d\u5236)<\/h4>\n<p>Pulsar\u5728\u96c6\u7fa4\u4e4b\u95f4\u5177\u6709\u590d\u5236\uff08Replication\uff09\u6d88\u606f\u7684\u529f\u80fd\u3002\u901a\u8fc7\u542f\u7528\u6b64\u529f\u80fd\uff0c\u53ef\u4ee5\u5728\u591a\u4e2a\u96c6\u7fa4\u4e2d\u6d88\u8d39\u76f8\u540c\u7684\u6d88\u606f\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u751f\u4ea7\u8005\u5c31\u4e0d\u9700\u8981\u5c06\u76f8\u540c\u7684\u6d88\u606f\u53d1\u5e03\u5230\u5176\u4ed6\u96c6\u7fa4\uff0c\u6d88\u8d39\u8005\u4e5f\u53ef\u4ee5\u5728\u79bb\u6d88\u8d39\u8005\u6700\u8fd1\u7684Pulsar\u96c6\u7fa4\u4e2d\u6d88\u8d39\u6d88\u606f\uff0c\u8fd9\u662f\u4e00\u4e2a\u4f18\u70b9\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u521b\u5efa\u96c6\u7fa4\u4e4b\u95f4\u7684\u5197\u4f59\u914d\u7f6e\u3002\u4f46\u662f\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6d88\u606f\u662f\u5f02\u6b65\u590d\u5236\u7684\uff0c\u56e0\u6b64\u5e76\u4e0d\u5b8c\u5168\u5b9e\u73b0\u4e86Pulsar\u4e0a\u7684\u5197\u4f59\u5907\u4efd\u3002<\/p>\n<p>\u56fe4\u663e\u793a\u4e86Geo Replication\u7684\u56fe\u50cf\u3002\u60a8\u53ef\u4ee5\u50cf\u84dd\u8272\u7bad\u5934\u90a3\u6837\uff0c\u5c06\u6d88\u606f\u590d\u5236\u5230Pulsar\u7684\u53e6\u4e00\u4e2a\u96c6\u7fa4\u4e2d\u7684\u4e3b\u9898\u4e2d\u3002\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u6b64\u5904\u3002<\/p>\n<ul class=\"post-ul\">Pulsar geo-replication<\/ul>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7d40913a08637a69f434\/43-0.png\" alt=\"pulsar_geo_replication.png\" \/><\/div>\n<h4>&#8220;\u6301\u4e45\u5316\u653f\u7b56&#8221;<\/h4>\n<p>\u524d\u4e00\u7bc0\u4ecb\u7d39\u7684\u6307\u5b9a\u5f62\u5f0f\u4e2d\u7684\u6301\u4e45 (persistent)\uff0c\u6307\u7684\u662f\u6d88\u606f\u7684\u6301\u4e45\u5316\u7b56\u7565\u3002\u6b64\u5916\u8fd8\u6709\u975e\u6301\u4e45\u5316 (non-persistent) \u7684\u7b56\u7565\u53ef\u4f9b\u9009\u62e9\u3002<br \/>\n\u6301\u4e45\u5316\u7b56\u7565\u53ef\u4ee5\u786e\u4fdd\u6d88\u606f\u88ab\u6301\u4e45\u5316\uff0c\u800c\u975e\u6301\u4e45\u5316\u7b56\u7565\u5219\u4e0d\u4f1a\u6301\u4e45\u5316\u6d88\u606f\u3002\u76f8\u53cd\uff0c\u5b83\u53ef\u4ee5\u5b9e\u73b0\u5feb\u901f\u4f20\u9001\u7ed9\u6d88\u8d39\u8005\u3002\u6839\u636e\u9700\u6c42\uff0c\u7528\u6237\u53ef\u4ee5\u7075\u6d3b\u9009\u62e9\u8fd9\u4e9b\u7b56\u7565\u3002\u66f4\u591a\u8be6\u60c5\u8bf7\u53c2\u8003\u8fd9\u91cc\u3002<\/p>\n<ul class=\"post-ul\">Non-persistent messaging<\/ul>\n<h4>\u901a\u8fc7\u4ee3\u7801\u5904\u7406\u6d88\u606f\uff08Pulsar Functions\uff09<\/h4>\n<p>Pulsar\u5177\u6709\u5bf9\u4e3b\u9898\u6d88\u606f\u8fdb\u884c\u4ee3\u7801\u7f16\u5199\u548c\u5904\u7406\u7684\u529f\u80fd\u3002\u7528\u6237\u53ea\u9700\u7f16\u5199\u5fc5\u8981\u7684\u4ee3\u7801\u5c31\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u529f\u80fd\u3002<\/p>\n<p>\u5728\u5185\u90e8\uff0c\u4f1a\u6309\u7167\u4e0b\u9762\u7684\u6d41\u7a0b\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u6839\u636e\u4e3b\u9898\u6d88\u8d39\u6d88\u606f<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u6839\u636e\u7528\u6237\u7f16\u5199\u7684\u4ee3\u7801\u5904\u7406\u6d88\u606f<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u5c06\u7ed3\u679c\u53d1\u5e03\u5230\u5176\u4ed6\u4e3b\u9898<\/ol>\n<p>\u56fe5\u662fPulsar Functions\u7684\u56fe\u50cf\u3002\u60a8\u53ef\u4ee5\u5728\u4e0d\u9700\u8981Pulsar\u4ee5\u5916\u7684\u4efb\u4f55\u7cfb\u7edf\u7684\u60c5\u51b5\u4e0b\u5b9e\u73b0\u6b64\u7c7b\u6d41\u5904\u7406\u3002\u8bf7\u67e5\u770b\u8fd9\u91cc\u4ee5\u83b7\u53d6\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<ul class=\"post-ul\">Pulsar Functions overview<\/ul>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7d40913a08637a69f434\/53-0.png\" alt=\"pulsar_functions.png\" \/><\/div>\n<h4>\u901a\u8fc7\u6d88\u606f\u67e5\u8be2\u8fdb\u884c\u62bd\u53d6\uff08Pulsar SQL\uff09<\/h4>\n<p>\u8fd9\u91cc\u6ca1\u6709\u4ecb\u7ecd\uff0c\u4f46\u662fPulsar\u6709\u4e00\u79cd\u673a\u5236\u53ef\u4ee5\u5b9a\u4e49\u6d88\u606f\u7684\u6a21\u5f0f\u3002\u901a\u8fc7\u5b9a\u4e49\u8fd9\u4e2a\u6a21\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528SQL\u6765\u8fdb\u884c\u6d88\u606f\u7684\u62bd\u53d6\u5904\u7406\u3002\u8be5\u673a\u5236\u4f7f\u7528\u4e86Presto\u3002\u8bf7\u53c2\u9605\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<ul class=\"post-ul\">Pulsar SQL Overview<\/ul>\n<h4>\u4e0ePulsar\u548c\u5176\u4ed6\u7cfb\u7edf\u7684\u8fde\u63a5\uff08Pulsar IO\uff09<\/h4>\n<p>\u60a8\u53ef\u4ee5\u5c06Pulsar\u7684\u6d88\u606f\u4f20\u9012\u7cfb\u7edf\u4e0e\u5176\u4ed6\u7cfb\u7edf\u8fde\u63a5\u8d77\u6765\uff0c\u4ee5\u53d1\u9001\u548c\u63a5\u6536\u6d88\u606f\u3002\u8fd9\u6837\uff0c\u60a8\u53ef\u4ee5\u5c06\u6d88\u606f\u5236\u6210Pulsar\u5e76\u5c06\u5176\u5b58\u50a8\u5728\u6570\u636e\u5e93\u4e2d\uff0c\u6216\u8005\u4ece\u5176\u4ed6\u6d88\u606f\u961f\u5217\u5411Pulsar\u5236\u4f5c\u6d88\u606f\u3002\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u6b64\u5904\u3002<\/p>\n<ul class=\"post-ul\">Pulsar connector overview<\/ul>\n<h2>\u8109\u51b2\u661f\u7684\u67b6\u6784<\/h2>\n<p>\u8109\u51b2\u661f\u53ef\u4ee5\u5728\u5404\u79cd\u60c5\u51b5\u4e0b\u4f5c\u4e3a\u6d88\u606f\u5e73\u53f0\u4f7f\u7528\u3002\u8bf7\u67e5\u770b\u4ee5\u4e0b\u662f\u5728Yahoo\u7ecf\u5e38\u4f7f\u7528\u7684\u60c5\u51b5\u3002<\/p>\n<ul class=\"post-ul\">Message Queue\u3092\u793e\u5185\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3068\u3057\u3066\u63d0\u4f9b\u3057\u3066\u307f\u305f \u301c Apache Pulsar\u6d3b\u7528\u4e8b\u4f8b \u301c#\u793e\u5185MQ\u6d3b\u7528\u4e8b\u4f8b<\/ul>\n<p>Pulsar\u5b9e\u73b0\u8fd9\u6837\u7684\u5e73\u53f0\u662f\u901a\u8fc7\u4ec0\u4e48\u6837\u7684\u67b6\u6784\u6765\u5b9e\u73b0\u7684\uff1f\u56fe6\u603b\u7ed3\u4e86\u6784\u6210Pulsar\u7684\u57fa\u672c\u7ec4\u4ef6\u548c\u67b6\u6784\u7684\u8bbe\u60f3\u3002\u4f46\u662f\uff0c\u9664\u6b64\u4e4b\u5916\u8fd8\u5b58\u5728\u5404\u79cd\u5404\u6837\u7684\u7ec4\u4ef6\u7528\u4e8e\u4e0d\u540c\u7684\u529f\u80fd\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7d40913a08637a69f434\/64-0.png\" alt=\"pulsar_architecture.png\" \/><\/div>\n<p>\u4ece\u56fe6\u4e2d\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u7ec4\u4ef6<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Broker<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Bookie<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">ZK (ZooKeeper)<\/ul>\n<p>\u53ef\u4ee5\u53d1\u73b0\u6709\u4e00\u79cd\u88ab\u79f0\u4e3aProducer\/Consumer\u7684\u5b58\u5728\u3002\u6b64\u5916\uff0cProducer\/Consumer\u4f3c\u4e4e\u901a\u8fc7Broker\u6765\u4ea4\u6362\u6d88\u606f\uff0c\u4f46\u6211\u8ba4\u4e3aBroker\u8fd8\u5411Bookie\u53d1\u9001\u6d88\u606f\u3002\u6211\u5c06\u89e3\u91ca\u8fd9\u4e9b\u7684\u542b\u4e49\u4ee5\u53ca\u6bcf\u4e2a\u7ec4\u4ef6\u7684\u89d2\u8272\u3002<\/p>\n<h3>\u7ecf\u7eaa\u4eba<\/h3>\n<p>\u7ecf\u7eaa\u4eba\u5728\u540d\u79f0\u4e0a\u8d77\u7740\u4e2d\u4ecb\u751f\u4ea7\u8005\/\u6d88\u8d39\u8005\u6d88\u606f\u4ea4\u4e92\u7684\u89d2\u8272\u3002\u6b64\u5916\uff0c\u5b83\u8fd8\u63d0\u4f9b\u7528\u4e8e\u5b9e\u73b0\u4e0a\u8ff0\u5730\u7406\u590d\u5236\u529f\u80fd\u4ee5\u53ca\u521b\u5efa\u548c\u6388\u6743\u79df\u6237\u3001\u547d\u540d\u7a7a\u95f4\u7b49\u7684REST API\u3002<\/p>\n<h3>\u535a\u5f69\u8005<\/h3>\n<p>\u4f5c\u4e3a\u8f6f\u4ef6\u540d\u79f0\uff0c\u6211\u4eec\u4f7f\u7528\u4e86\u540d\u4e3aApache BookKeeper\u7684\u5b58\u50a8\u7cfb\u7edf\u3002\u5728Apache BookKeeper\u4e2d\uff0c\u5c06\u8d1f\u8d23\u4fdd\u5b58\u6d88\u606f\u7684\u670d\u52a1\u5668\u79f0\u4e3aBookie\u3002Bookie\u8fd8\u4f1a\u4fdd\u5b58\u4e0e\u6d88\u606f\u4e00\u8d77\u7684\u7528\u4e8e\u7ba1\u7406\u8ba2\u9605\u5c06\u6d88\u606f\u6d88\u8d39\u5230\u54ea\u4e2a\u4f4d\u7f6e\u7684\u4fe1\u606f\uff0c\u79f0\u4e3a\u6e38\u6807\u3002\u901a\u8fc7\u5b58\u50a8\u6d88\u606f\uff0c\u5373\u4f7f\u7531\u4e8e\u6545\u969c\u7b49\u539f\u56e0\u5bfc\u81f4\u6d88\u8d39\u8005\u65e0\u6cd5\u63a5\u6536\u6d88\u606f\uff0c\u4e5f\u53ef\u4ee5\u91cd\u65b0\u53d1\u9001\u6d88\u606f\u5e76\u8fdb\u884c\u5904\u7406\u3002 \u770b\u8d77\u6765\u6d88\u606f\u662f\u7531Broker\u53d1\u9001\u7ed9\u591a\u4e2aBookie\u7684\uff0c\u8fd9\u662f\u56e0\u4e3aBookie\u53ef\u4ee5\u5c06\u76f8\u540c\u7684\u6570\u636e\u4fdd\u5b58\u5728\u591a\u4e2aBookie\u4e0a\u3002\u6839\u636eBroker\u7aef\u8bbe\u7f6e\u7684\u6d88\u606f\uff08\u51c6\u786e\u8bf4\u662fBookie\u7684\u6761\u76ee\uff09\u5199\u5165\u526f\u672c\u6570\uff0c\u6d88\u606f\u5c06\u88ab\u5199\u5165\u5176\u4e2d\u4e00\u53f0Bookie\u3002\u56e0\u6b64\uff0c\u5373\u4f7f\u53d1\u751f\u4e86\u4e00\u53f0Bookie\u7684\u6545\u969c\uff0c\u4ecd\u7136\u53ef\u4ee5\u7ee7\u7eed\u8bfb\u53d6\u6d88\u606f\u3002<\/p>\n<h3>\u52a8\u7269\u56ed\u7ba1\u7406\u7cfb\u7edf\uff08ZooKeeper\uff09<\/h3>\n<p>\u5728\u8f6f\u4ef6\u540d\u79f0\u65b9\u9762\uff0c\u6211\u4eec\u4f7f\u7528\u4e86\u4e00\u4e2a\u540d\u4e3aApache ZooKeeper\uff08\u4ee5\u4e0b\u7b80\u79f0\u4e3aZooKeeper\uff09\u7684\u5143\u6570\u636e\u5b58\u50a8\u7cfb\u7edf\u3002\u5728Pulsar\u4e2d\uff0c\u6211\u4eec\u5c06ZooKeeper\u5206\u4e3a\u4ee5\u4e0b\u4e24\u79cd\u7528\u6cd5\uff0c\u5e76\u5728\u4e0d\u540c\u7684\u8fdb\u7a0b\u4e2d\u542f\u52a8\u5b83\u4eec\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Configuration Store<\/ul>\n<\/li>\n<\/ul>\n<p>Pulsar\u306e\u3059\u3079\u3066\u306e\u30af\u30e9\u30b9\u30bf\u3067\u5171\u901a\u3059\u308b\u8a2d\u5b9a\u60c5\u5831\uff08\u4f8b: \u30c6\u30ca\u30f3\u30c8\u3001\u30cd\u30fc\u30e0\u30b9\u30da\u30fc\u30b9\u306a\u3069\uff09\u3092\u4fdd\u6301\u3057\u307e\u3059<\/p>\n<p>Local ZooKeeper<\/p>\n<p>Pulsar\u306e\u305d\u308c\u305e\u308c\u306e\u30af\u30e9\u30b9\u30bf\u3067\u72ec\u7acb\u3057\u305f\u8a2d\u5b9a\u60c5\u5831\uff08\u4f8b: Broker\u3001Bookie\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u306a\u3069\uff09\u3092\u4fdd\u6301\u3057\u307e\u3059<\/p>\n<h3>\u6c34\u5e73\u523b\u5ea6<\/h3>\n<p>\u5982\u524d\u6240\u8ff0\uff0cPulsar\u7684\u529f\u80fd\u4e4b\u4e00\u662f\u5b83\u5177\u5907\u6c34\u5e73\u6269\u5c55\u7684\u80fd\u529b\u3002\u5176\u4e2d\u4e00\u4e2a\u539f\u56e0\u662fBroker\u548cBookie\u7684\u89d2\u8272\u5206\u5f00\u3002<\/p>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5f53\u6d88\u606f\u5199\u5165\u7684\u8d1f\u8f7d\u589e\u52a0\u65f6\uff0c\u53ea\u9700\u589e\u52a0Bookie\u5e76\u8fdb\u884c\u90e8\u7f72\u5373\u53ef\u3002Bookie\u4f5c\u4e3a\u4e00\u4e2a\u53ef\u6269\u5c55\u7684\u7279\u6027\uff0c\u53ef\u4ee5\u5728\u589e\u52a0Bookie\u65f6\u4e0d\u9700\u8981\u66f4\u6539\u5176\u4ed6Bookie\u7684\u914d\u7f6e\u8fdb\u884c\u90e8\u7f72\u3002\u540c\u6837\u5730\uff0c\u5f53\u6765\u81eaProducer\/Consumer\u7684\u8bbf\u95ee\u589e\u52a0\u5bfc\u81f4\u8d1f\u8f7d\u589e\u52a0\u65f6\uff0c\u53ea\u9700\u589e\u52a0Broker\u5e76\u8fdb\u884c\u90e8\u7f72\u5373\u53ef\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861\u3002\u8fd9\u662f\u56e0\u4e3aBroker\u4e0d\u4f1a\u6301\u4e45\u5316\u6570\u636e\u4e14\u65e0\u72b6\u6001\u3002<\/p>\n<p>\u8fd9\u4e2a\u673a\u5236\u7684\u5bf9\u6bd4\u4f8b\u5b50\u662f Apache Kafka\uff08\u4ee5\u4e0b\u7b80\u79f0 Kafka\uff09\u3002Kafka\u7684\u57fa\u672c\u7ec4\u4ef6\u5305\u62ec Broker \u548c ZooKeeper\u3002Kafka\u4e5f\u6709\u6d88\u606f\u6301\u4e45\u5316\u673a\u5236\uff0c\u4f46\u662f\u6d88\u606f\u662f\u4fdd\u5b58\u5728 Broker \u4e0a\u7684\u3002\u56e0\u6b64\uff0c\u5373\u4f7f\u6dfb\u52a0\u4e86\u65b0\u7684 Broker \u670d\u52a1\u5668\uff0c\u8d1f\u8f7d\u4e0d\u4f1a\u81ea\u52a8\u5730\u4ece\u73b0\u6709\u7684 Broker \u8f6c\u79fb\u5230\u65b0\u7684 Broker \u4e0a\u3002<\/p>\n<h2>\u4f60\u597d\uff0c\u8109\u51b2\u661f\u3002<\/h2>\n<p>\u4e0b\u9762\u5c06\u4ecb\u7ecd\u4e00\u7cfb\u5217\u4f7f\u7528Pulsar\u7684\u5b9e\u9645\u6b65\u9aa4\u3002\u9996\u5148\u9700\u8981\u4e86\u89e3\u4e00\u70b9\uff0cPulsar\u6709\u4e00\u79cd\u79f0\u4e3astandalone\u7684\u6a21\u5f0f\uff0c\u53ef\u4ee5\u5c06Broker\u3001Bookie\u548cZooKeeper\u4f5c\u4e3a\u4e00\u4e2aJVM\u8fdb\u7a0b\u4e00\u8d77\u542f\u52a8\u3002\u8fd9\u6b21\u6211\u4eec\u5c06\u4f7f\u7528standalone\u6a21\u5f0f\u6765\u542f\u52a8Pulsar\uff0c\u5e76\u5c1d\u8bd5\u4f7f\u7528Java\u5ba2\u6237\u7aef\u521b\u5efaProducer\u548cConsumer\u3002<\/p>\n<h3>\u524d\u63d0 t\u00ed)<\/h3>\n<p>\u9996\u5148\uff0c\u672c\u6b21\u73af\u5883\u5efa\u7acb\u5047\u8bbe\u662f\u5728macOS\u6216Linux\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fdb\u884c\u3002\u53e6\u5916\uff0c\u72ec\u7acb\u6a21\u5f0f\u9ed8\u8ba4\u9700\u89812GB\u5185\u5b58\u3002\u987a\u4fbf\u4e00\u63d0\uff0c\u8fd9\u4e2a\u6b65\u9aa4\u57fa\u672c\u4e0a\u662f\u6309\u7167\u5b98\u65b9\u6587\u6863\u6765\u8fdb\u884c\u7684\u3002<\/p>\n<h4>\u5b89\u88c5Java11<\/h4>\n<p>\u4eceJDK 11\u5f00\u59cb\uff0c\u5b89\u88c5Java11\u3002<\/p>\n<h3>Pulsar\u7684\u4e0b\u8f7d\u548c\u89e3\u538b<\/h3>\n<p>\u4f7f\u7528\u4e0b\u5217\u547d\u4ee4\u4e0b\u8f7dPulsar v2.5.0\uff1a<\/p>\n<pre class=\"post-pre\"><code>$ wget https:\/\/archive.apache.org\/dist\/pulsar\/pulsar-2.5.0\/apache-pulsar-2.5.0-bin.tar.gz\r\n<\/code><\/pre>\n<p>\u5b8c\u6210\u4e0b\u8f7d\u540e\uff0c\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u89e3\u538b\u5e76\u79fb\u52a8Pulsar\u3002<\/p>\n<pre class=\"post-pre\"><code>$ tar xfz apache-pulsar-2.5.0-bin.tar.gz\r\n$ cd apache-pulsar-2.5.0\r\n<\/code><\/pre>\n<h3>\u542f\u52a8Pulsar\u5e76\u521b\u5efa\u79df\u6237\u548c\u547d\u540d\u7a7a\u95f4\u3002<\/h3>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8\u72ec\u7acb\u6a21\u5f0f\u7684Pulsar\uff0c\u5176\u7d27\u968f\u4e0a\u8ff0\u5185\u5bb9\u3002<\/p>\n<pre class=\"post-pre\"><code>$ bin\/pulsar standalone\r\n<\/code><\/pre>\n<p>\u8bf7\u51c6\u5907\u53e6\u4e00\u4e2a\u7ec8\u7aef\uff0c\u5e76\u79fb\u52a8\u5230\u4e0e\u4e0a\u8ff0\u76f8\u540c\u7684\u76ee\u5f55\u3002\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u793a\u4f8b\u4ee3\u7801\u7684\u79df\u6237\u547d\u540d\u7a7a\u95f4\u3002\u9ed8\u8ba4\u8bbe\u7f6e\u4e0b\uff0c\u5728Produce\/Consume\u4e3b\u9898\u65f6\uff0c\u4e3b\u9898\u4f1a\u81ea\u52a8\u521b\u5efa\u3002<\/p>\n<pre class=\"post-pre\"><code>$ bin\/pulsar-admin tenants create my-tenant\r\n\r\n$ bin\/pulsar-admin namespaces create my-tenant\/my-namespace\r\n<\/code><\/pre>\n<h3>\u793a\u4f8b\u4ee3\u7801<\/h3>\n<h4>\u5236\u7247\u4eba (zh\u00ec<\/h4>\n<p>\u4f60\u597dHelloProducer.java<\/p>\n<pre class=\"post-pre\"><code><span class=\"kn\">package<\/span> <span class=\"nn\">pulsar.hello<\/span><span class=\"o\">;<\/span>\r\n\r\n<span class=\"kn\">import<\/span> <span class=\"nn\">org.apache.pulsar.client.api.PulsarClient<\/span><span class=\"o\">;<\/span>\r\n<span class=\"kn\">import<\/span> <span class=\"nn\">org.apache.pulsar.client.api.Producer<\/span><span class=\"o\">;<\/span>\r\n\r\n<span class=\"kd\">class<\/span> <span class=\"nc\">HelloProducer<\/span> <span class=\"o\">{<\/span>\r\n\r\n    <span class=\"kd\">public<\/span> <span class=\"kd\">static<\/span> <span class=\"kt\">void<\/span> <span class=\"nf\">main<\/span><span class=\"o\">(<\/span><span class=\"nc\">String<\/span><span class=\"o\">[]<\/span> <span class=\"n\">args<\/span><span class=\"o\">)<\/span> <span class=\"kd\">throws<\/span> <span class=\"nc\">Exception<\/span> <span class=\"o\">{<\/span>\r\n\r\n        <span class=\"nc\">PulsarClient<\/span> <span class=\"n\">pulsarClient<\/span> <span class=\"o\">=<\/span> <span class=\"nc\">PulsarClient<\/span><span class=\"o\">.<\/span><span class=\"na\">builder<\/span><span class=\"o\">()<\/span>\r\n                <span class=\"o\">.<\/span><span class=\"na\">serviceUrl<\/span><span class=\"o\">(<\/span><span class=\"s\">\"pulsar:\/\/localhost:6650\"<\/span><span class=\"o\">)<\/span>\r\n                <span class=\"o\">.<\/span><span class=\"na\">build<\/span><span class=\"o\">();<\/span>\r\n\r\n        <span class=\"nc\">Producer<\/span><span class=\"o\">&lt;<\/span><span class=\"kt\">byte<\/span><span class=\"o\">[]&gt;<\/span> <span class=\"n\">producer<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pulsarClient<\/span><span class=\"o\">.<\/span><span class=\"na\">newProducer<\/span><span class=\"o\">()<\/span>\r\n                <span class=\"o\">.<\/span><span class=\"na\">topic<\/span><span class=\"o\">(<\/span><span class=\"s\">\"persistent:\/\/my-tenant\/my-namespace\/my-topic\"<\/span><span class=\"o\">)<\/span>\r\n                <span class=\"o\">.<\/span><span class=\"na\">create<\/span><span class=\"o\">();<\/span>\r\n\r\n        <span class=\"k\">for<\/span> <span class=\"o\">(<\/span><span class=\"kt\">int<\/span> <span class=\"n\">i<\/span> <span class=\"o\">=<\/span> <span class=\"mi\">0<\/span><span class=\"o\">;<\/span> <span class=\"n\">i<\/span> <span class=\"o\">&lt;<\/span> <span class=\"mi\">10<\/span><span class=\"o\">;<\/span> <span class=\"n\">i<\/span><span class=\"o\">++)<\/span> <span class=\"o\">{<\/span>\r\n            <span class=\"c1\">\/\/ \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3059\u308b<\/span>\r\n            <span class=\"n\">producer<\/span><span class=\"o\">.<\/span><span class=\"na\">send<\/span><span class=\"o\">(<\/span><span class=\"nc\">String<\/span><span class=\"o\">.<\/span><span class=\"na\">format<\/span><span class=\"o\">(<\/span><span class=\"s\">\"my-message-%d\"<\/span><span class=\"o\">,<\/span> <span class=\"n\">i<\/span><span class=\"o\">).<\/span><span class=\"na\">getBytes<\/span><span class=\"o\">());<\/span>\r\n        <span class=\"o\">}<\/span>\r\n\r\n        <span class=\"n\">pulsarClient<\/span><span class=\"o\">.<\/span><span class=\"na\">close<\/span><span class=\"o\">();<\/span>\r\n\r\n    <span class=\"o\">}<\/span>\r\n<span class=\"o\">}<\/span>\r\n\r\n<\/code><\/pre>\n<h4>\u6d88\u8d39\u8005<\/h4>\n<p>\u4f60\u597d\uff0c\u6d88\u8d39\u8005.java<\/p>\n<pre class=\"post-pre\"><code><span class=\"kn\">package<\/span> <span class=\"nn\">pulsar.hello<\/span><span class=\"o\">;<\/span>\r\n\r\n<span class=\"kn\">import<\/span> <span class=\"nn\">org.apache.pulsar.client.api.PulsarClient<\/span><span class=\"o\">;<\/span>\r\n<span class=\"kn\">import<\/span> <span class=\"nn\">org.apache.pulsar.client.api.Consumer<\/span><span class=\"o\">;<\/span>\r\n<span class=\"kn\">import<\/span> <span class=\"nn\">org.apache.pulsar.client.api.Message<\/span><span class=\"o\">;<\/span>\r\n\r\n<span class=\"kd\">class<\/span> <span class=\"nc\">HelloConsumer<\/span> <span class=\"o\">{<\/span>\r\n\r\n    <span class=\"kd\">public<\/span> <span class=\"kd\">static<\/span> <span class=\"kt\">void<\/span> <span class=\"nf\">main<\/span><span class=\"o\">(<\/span><span class=\"nc\">String<\/span><span class=\"o\">[]<\/span> <span class=\"n\">args<\/span><span class=\"o\">)<\/span> <span class=\"kd\">throws<\/span> <span class=\"nc\">Exception<\/span> <span class=\"o\">{<\/span>\r\n\r\n        <span class=\"nc\">PulsarClient<\/span> <span class=\"n\">pulsarClient<\/span> <span class=\"o\">=<\/span> <span class=\"nc\">PulsarClient<\/span><span class=\"o\">.<\/span><span class=\"na\">builder<\/span><span class=\"o\">()<\/span>\r\n                <span class=\"o\">.<\/span><span class=\"na\">serviceUrl<\/span><span class=\"o\">(<\/span><span class=\"s\">\"pulsar:\/\/localhost:6650\"<\/span><span class=\"o\">)<\/span>\r\n                <span class=\"o\">.<\/span><span class=\"na\">build<\/span><span class=\"o\">();<\/span>\r\n\r\n        <span class=\"nc\">Consumer<\/span><span class=\"o\">&lt;<\/span><span class=\"kt\">byte<\/span><span class=\"o\">[]&gt;<\/span> <span class=\"n\">consumer<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pulsarClient<\/span><span class=\"o\">.<\/span><span class=\"na\">newConsumer<\/span><span class=\"o\">()<\/span>\r\n                <span class=\"o\">.<\/span><span class=\"na\">topic<\/span><span class=\"o\">(<\/span><span class=\"s\">\"persistent:\/\/my-tenant\/my-namespace\/my-topic\"<\/span><span class=\"o\">)<\/span>\r\n                <span class=\"o\">.<\/span><span class=\"na\">subscriptionName<\/span><span class=\"o\">(<\/span><span class=\"s\">\"my-subscription-name\"<\/span><span class=\"o\">)<\/span>\r\n                <span class=\"o\">.<\/span><span class=\"na\">subscribe<\/span><span class=\"o\">();<\/span>\r\n\r\n        <span class=\"k\">for<\/span> <span class=\"o\">(<\/span><span class=\"kt\">int<\/span> <span class=\"n\">i<\/span> <span class=\"o\">=<\/span> <span class=\"mi\">0<\/span><span class=\"o\">;<\/span> <span class=\"n\">i<\/span> <span class=\"o\">&lt;<\/span> <span class=\"mi\">10<\/span><span class=\"o\">;<\/span> <span class=\"n\">i<\/span><span class=\"o\">++)<\/span> <span class=\"o\">{<\/span>\r\n            <span class=\"c1\">\/\/ \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d7\u4fe1\u3059\u308b<\/span>\r\n            <span class=\"nc\">Message<\/span> <span class=\"n\">msg<\/span> <span class=\"o\">=<\/span> <span class=\"n\">consumer<\/span><span class=\"o\">.<\/span><span class=\"na\">receive<\/span><span class=\"o\">();<\/span>\r\n            <span class=\"nc\">System<\/span><span class=\"o\">.<\/span><span class=\"na\">out<\/span><span class=\"o\">.<\/span><span class=\"na\">println<\/span><span class=\"o\">(<\/span><span class=\"s\">\"Received message: \"<\/span> <span class=\"o\">+<\/span> <span class=\"k\">new<\/span> <span class=\"nc\">String<\/span><span class=\"o\">(<\/span><span class=\"n\">msg<\/span><span class=\"o\">.<\/span><span class=\"na\">getData<\/span><span class=\"o\">()));<\/span>\r\n\r\n            <span class=\"c1\">\/\/ Broker\u306bACK\u3092\u8fd4\u3059<\/span>\r\n            <span class=\"n\">consumer<\/span><span class=\"o\">.<\/span><span class=\"na\">acknowledge<\/span><span class=\"o\">(<\/span><span class=\"n\">msg<\/span><span class=\"o\">);<\/span>\r\n        <span class=\"o\">}<\/span>\r\n\r\n        <span class=\"n\">pulsarClient<\/span><span class=\"o\">.<\/span><span class=\"na\">close<\/span><span class=\"o\">();<\/span>\r\n\r\n    <span class=\"o\">}<\/span>\r\n<span class=\"o\">}<\/span>\r\n\r\n<\/code><\/pre>\n<h4>pom.xml \u53ef\u4ee5\u7528\u4e2d\u6587\u7ffb\u8bd1\u4e3a\u300c\u9879\u76ee\u5bf9\u8c61\u6a21\u578b\u6587\u4ef6\u300d\u3002<\/h4>\n<p>\u5047\u8bbe\u4f60\u6b63\u5728\u4f7f\u7528Maven\uff0c\u90a3\u4e48\u8bf7\u5728\u4ee3\u7801\u5757\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nt\">&lt;dependency&gt;<\/span>\r\n  <span class=\"nt\">&lt;groupId&gt;<\/span>org.apache.pulsar<span class=\"nt\">&lt;\/groupId&gt;<\/span>\r\n  <span class=\"nt\">&lt;artifactId&gt;<\/span>pulsar-client<span class=\"nt\">&lt;\/artifactId&gt;<\/span>\r\n  <span class=\"nt\">&lt;version&gt;<\/span>2.5.0<span class=\"nt\">&lt;\/version&gt;<\/span>\r\n<span class=\"nt\">&lt;\/dependency&gt;<\/span>\r\n<\/code><\/pre>\n<h4>\u8fd0\u884c\u4ee3\u7801<\/h4>\n<p>\u5c06\u4e0a\u8ff0\u7684\u793a\u4f8b\u4ee3\u7801\u8fdb\u884c\u7f16\u8bd1<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u6d88\u8d39\u8005<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u751f\u4ea7\u8005<\/ol>\n<p>\u5728\u4e0d\u540c\u7684\u7ec8\u7aef\u4e2d\u6309\u7167\u4ee5\u4e0b\u987a\u5e8f\u542f\u52a8\u3002\u7136\u540e\uff0c\u53ef\u4ee5\u5728Consumer\u7684\u6807\u51c6\u8f93\u51fa\u4e2d\u786e\u8ba4\u662f\u5426\u8f93\u51fa\u4e86\u5982\u4e0b\u6d88\u606f\u3002<\/p>\n<pre class=\"post-pre\"><code>Received message: my-message-0\r\nReceived message: my-message-1\r\nReceived message: my-message-2\r\nReceived message: my-message-3\r\nReceived message: my-message-4\r\nReceived message: my-message-5\r\nReceived message: my-message-6\r\nReceived message: my-message-7\r\nReceived message: my-message-8\r\nReceived message: my-message-9\r\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u6837\u7684\u65b9\u5f0f\uff0c\u7531\u4e8e\u5ba2\u6237\u9700\u6c42\u76f8\u5bf9\u7b80\u660e\uff0c\u53ef\u4ee5\u8f7b\u677e\u8fdb\u884c\u521d\u59cb\u5f15\u5165\u3002<\/p>\n<h1>\u7ec8\u70b9<\/h1>\n<p>\u7b2c1\u56de\u5230\u6b64\u4e3a\u6b62\u3002\u603b\u7ed3\u4e00\u4e0b\uff0c\u6211\u5199\u4e86\u4ee5\u4e0b\u5185\u5bb9\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Pulsar\u306e\u57fa\u672c\u7684\u306a\u89e3\u8aac<\/ul>\n<\/li>\n<\/ul>\n<p>\u3055\u307e\u3056\u307e\u306a\u6a5f\u80fd<br \/>\nPulsar\u3092\u69cb\u6210\u3059\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/p>\n<p>Pulsar\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/p>\n<p>\u7c21\u6613\u7684\u306a\u30b5\u30fc\u30d0\u30fc\u8d77\u52d5<br \/>\n\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u5b9f\u884c<\/p>\n<p>\u4e5f\u8bb8\u5185\u5bb9\u6709\u70b9\u591a\uff0c\u4f46\u5982\u679c\u60a8\u6709\u60f3\u8981\u6df1\u5165\u63a2\u8ba8\u7684\u8bdd\u9898\uff0c\u53ef\u4ee5\u53c2\u8003\u9002\u5f53\u7684\u94fe\u63a5\u4e2d\u63d0\u4f9b\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\u4e0b\u6b21\u6211\u4eec\u5c06\u7f29\u51cf\u4e00\u4e9b\u5185\u5bb9\uff0c\u8ba1\u5212\u4ecb\u7ecd\u66f4\u591a\u5173\u4e8e\u5ba2\u6237\u7aef\u4ee3\u7801\u7684\u5e94\u7528\u529f\u80fd\u3002\u7531\u4e8e\u8fd9\u6b21\u65e0\u6cd5\u89e3\u91ca\u524d\u534a\u90e8\u5206\u4ecb\u7ecd\u7684\u529f\u80fd\u7684\u5b9e\u9645\u4f7f\u7528\u65b9\u6cd5\uff0c\u6211\u4eec\u8003\u8651\u8981\u8865\u5145\u8fd9\u65b9\u9762\u7684\u5185\u5bb9\u3002<\/p>\n<p>\u8fd9\u91cc\u4ecb\u7ecd\u4e00\u4e0b\uff0cPulsar\u793e\u533a\u4f3c\u4e4e\u6b63\u5728\u8ba1\u5212\u4e3e\u529ePulsar Summit\u5cf0\u4f1a\u3002\u6211\u4e2a\u4eba\u8ba4\u4e3a\u8fd9\u5c06\u662f\u4e86\u89e3\u793e\u533a\u53d1\u5c55\u72b6\u51b5\u7684\u673a\u4f1a\u3002\u5728GitHub\u4e0a\u6301\u7eed\u51fa\u73b0\u79ef\u6781\u7684\u95ee\u9898\u548c\u62c9\u53d6\u8bf7\u6c42\uff0c\u53ef\u4ee5\u611f\u53d7\u5230\u793e\u533a\u6b63\u5728\u84ec\u52c3\u53d1\u5c55\u3002\u987a\u4fbf\u8bf4\u4e00\u4e0b\uff0c\u867d\u7136\u6211\u53ea\u5728Pulsar\u5f00\u53d1\u548c\u8fd0\u7ef4\u56e2\u961f\u5de5\u4f5c\u4e86\u5927\u7ea65\u4e2a\u6708\uff0c\u4f46\u6bcf\u5929\u90fd\u80fd\u770b\u5230\u793e\u533a\u7684\u6d3b\u8dc3\uff0c\u611f\u53d7\u5230Pulsar\u76f8\u8f83\u4ee5\u524d\u7684\u6539\u5584\u3002\u6211\u5e0c\u671b\u7ee7\u7eed\u5173\u6ce8\u672a\u6765\u7684\u52a8\u6001\u3002<\/p>\n<p>\u6211\u89c9\u5f97\u4e0b\u4e00\u6b21\u53ef\u80fd\u4f1a\u53d8\u4e3a\u4e0d\u5b9a\u671f\u53d1\u5e03\uff0c\u656c\u8bf7\u671f\u5f85\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7\u83b7\u5f97\u516c\u53f8\u8bb8\u53ef\uff0c\u6211\u5c06\u6295\u7a3f\u7ed9Yahoo! JAPAN\u6280\u672f\u535a\u5ba2\u7684\u6587\u7ae0\u8f6c\u8f7d\u5230\u8fd9\u91cc\u3002 Apache Pulsar\u6d88\u606f [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-47245","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300cApache Pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09 - Blog - Silicon Cloud<\/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.silicloud.com\/zh\/blog\/\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300capache-pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300cApache Pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09\" \/>\n<meta property=\"og:description\" content=\"\u901a\u8fc7\u83b7\u5f97\u516c\u53f8\u8bb8\u53ef\uff0c\u6211\u5c06\u6295\u7a3f\u7ed9Yahoo! JAPAN\u6280\u672f\u535a\u5ba2\u7684\u6587\u7ae0\u8f6c\u8f7d\u5230\u8fd9\u91cc\u3002 Apache Pulsar\u6d88\u606f [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300capache-pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-27T22:14:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T18:19:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7d40913a08637a69f434\/16-0.png\" \/>\n<meta name=\"author\" content=\"\u6587, \u7fd4\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6587, \u7fd4\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/\",\"name\":\"\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300cApache Pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-11-27T22:14:04+00:00\",\"dateModified\":\"2024-04-29T18:19:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300cApache Pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\",\"name\":\"\u6587, \u7fd4\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"caption\":\"\u6587, \u7fd4\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300cApache Pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09 - Blog - Silicon Cloud","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.silicloud.com\/zh\/blog\/\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300capache-pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09\/","og_locale":"zh_CN","og_type":"article","og_title":"\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300cApache Pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09","og_description":"\u901a\u8fc7\u83b7\u5f97\u516c\u53f8\u8bb8\u53ef\uff0c\u6211\u5c06\u6295\u7a3f\u7ed9Yahoo! JAPAN\u6280\u672f\u535a\u5ba2\u7684\u6587\u7ae0\u8f6c\u8f7d\u5230\u8fd9\u91cc\u3002 Apache Pulsar\u6d88\u606f [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300capache-pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-11-27T22:14:04+00:00","article_modified_time":"2024-04-29T18:19:04+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d7d40913a08637a69f434\/16-0.png"}],"author":"\u6587, \u7fd4","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6587, \u7fd4","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/","name":"\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300cApache Pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-11-27T22:14:04+00:00","dateModified":"2024-04-29T18:19:04+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u6d88\u606f\u4f20\u9012\u5e73\u53f0\u300cApache Pulsar\u300d\u7684\u4f7f\u7528\u65b9\u6cd5\uff08\u5165\u95e8\u7bc7\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c","name":"\u6587, \u7fd4","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","caption":"\u6587, \u7fd4"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%b6%88%e6%81%af%e4%bc%a0%e9%80%92%e5%b9%b3%e5%8f%b0%e3%80%8capache-pulsar%e3%80%8d%e7%9a%84%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95%ef%bc%88%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%89\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=47245"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47245\/revisions"}],"predecessor-version":[{"id":89086,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47245\/revisions\/89086"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=47245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=47245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=47245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}