{"id":2164,"date":"2017-10-16T14:43:34","date_gmt":"2017-10-16T06:43:34","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2164"},"modified":"2017-10-16T14:43:34","modified_gmt":"2017-10-16T06:43:34","slug":"openmessaging%e6%9e%b6%e6%9e%84%e5%8e%9f%e7%90%86%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2164","title":{"rendered":"openmessaging\u67b6\u6784\u539f\u7406\u89e3\u6790"},"content":{"rendered":"<p>\n\t<a href=\"https:\/\/www.xttblog.com\/?tag=openmessaging\" name=\"openmessaging\" target=\"_blank\" title=\"openmessaging\">openmessaging<\/a>&nbsp;\u6784\u5efa\u5206\u5e03\u5f0f\u6d88\u606f\u4f20\u9012\u7684\u5f00\u653e\u6807\u51c6\u3002\u53e3\u53f7\u54cd\u4eae\uff0c\u5382\u5546\u4f17\u591a\uff0c<a href=\"https:\/\/www.xttblog.com\/?tag=openmessaging\" name=\"openmessaging\" target=\"_blank\" title=\"openmessaging\">openmessaging<\/a> \u4e00\u51fa\u751f\u5c31\u6709\u4f17\u591a\u5927\u4f6c\uff08\u963f\u91cc\u4e91\uff0c\u6ef4\u6ef4\uff0c\u96c5\u864e\uff0c\u4e9a\u9a6c\u900a\uff0c\u8c37\u6b4c\u7b49\uff09\u7684\u5149\u73af\u3002\u800c\u963f\u91cc\u6350\u732e\u7ed9Apache \u7684 RocketMQ \u7387\u5148\u4e3aOpen Messaging\u63d0\u4f9b\u4e86\u90e8\u5206\u5b9e\u73b0\u3002\u672c\u6587\u6839\u636e&nbsp;<a href=\"https:\/\/www.xttblog.com\/?tag=openmessaging\" name=\"openmessaging\" target=\"_blank\" title=\"openmessaging\">openmessaging<\/a> \u5f00\u6e90\u7684\u4e00\u4e9b\u8d44\u6599\u6765\u89e3\u6790&nbsp;<a href=\"https:\/\/www.xttblog.com\/?tag=openmessaging\" name=\"openmessaging\" target=\"_blank\" title=\"openmessaging\">openmessaging<\/a> \u6280\u672f\u539f\u7406\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"openmessaging\" src=\"http:\/\/openmessaging.cloud\/images\/@blog\/oms-domain-design-v0.1.png\" style=\"width: 857px;height: 481px\" \/>\n<\/p>\n<p>\n\t\u4e0a\u56fe\u662f\u5f15\u7528&nbsp;<a href=\"https:\/\/www.xttblog.com\/?tag=openmessaging\" name=\"openmessaging\" target=\"_blank\" title=\"openmessaging\">openmessaging<\/a> \u5b98\u7f51\u7684\u4e00\u5f20\u67b6\u6784\u56fe\u3002\n<\/p>\n<p>\n\t<a href=\"https:\/\/www.xttblog.com\/?tag=openmessaging\" name=\"openmessaging\" target=\"_blank\" title=\"openmessaging\">openmessaging<\/a>&nbsp;<font><font>\u6700\u8fd1\u53d1\u5e03\u4e86\u7b2c\u4e00\u4e2a<\/font><\/font><a href=\"https:\/\/search.maven.org\/#search%7Cga%7C1%7Copenmessaging\"><font><font>alpha\u7248\u672c<\/font><\/font><\/a><font><font>\uff0cApache RocketMQ\u5df2\u7ecf<\/font><font>\u4e3aOpenMessaging-0.1.0-alpha&nbsp;<\/font><font>\u63d0\u4f9b\u4e86<\/font><\/font><a href=\"https:\/\/github.com\/apache\/incubator-rocketmq\/tree\/openmessaging-impl\/openmessaging\"><font><font>\u90e8\u5206\u5b9e\u73b0<\/font><\/font><\/a><font><font>\u3002<\/font><\/font>\n<\/p>\n<h2>\n\t<font><font>NAMESPACE&nbsp;\u547d\u540d\u7a7a\u95f4<\/font><\/font><br \/>\n<\/h2>\n<p>\n\t<font><font>\u547d\u540d\u7a7a\u95f4\u559c\u6b22cgroup\u547d\u540d\u7a7a\u95f4\uff0c\u521b\u5efa\u4e00\u4e2a\u5177\u6709\u5b89\u5168\u4fdd\u8bc1\u7684\u9694\u79bb\u7a7a\u95f4\u3002\u6bcf\u4e2a\u547d\u540d\u7a7a\u95f4\u90fd\u6709\u81ea\u5df1\u7684\u4e00\u7ec4\u751f\u4ea7\u8005\uff0c\u6d88\u8d39\u8005\uff0c\u4e3b\u9898\uff0c\u961f\u5217\u7b49\u3002<\/font><\/font><a href=\"https:\/\/www.xttblog.com\/?tag=openmessaging\" name=\"openmessaging\" target=\"_blank\" title=\"openmessaging\">openmessaging<\/a><font><font>\u4f7f\u7528MessagingAccessPoint\u8bbf\u95ee\/\u8bfb\u53d6\/\u5199\u5165\u6307\u5b9a\u547d\u540d\u7a7a\u95f4\u7684\u8d44\u6e90\u3002<\/font><\/font>\n<\/p>\n<h2>\n\tPRODUCER&nbsp;\u751f\u4ea7\u8005<br \/>\n<\/h2>\n<p>\n\t<a href=\"https:\/\/www.xttblog.com\/?tag=openmessaging\" name=\"openmessaging\" target=\"_blank\" title=\"openmessaging\">openmessaging<\/a>\u5b9a\u4e49\u4e86\u4e24\u79cdProducer\uff1aProducer\u548cSequenceProducer\u3002\n<\/p>\n<ul>\n<li>\n\t\t\u751f\u4ea7\u8005\uff0c\u63d0\u4f9b\u5404\u79cd\u53d1\u9001\u65b9\u5f0f\u6765\u53d1\u9001\u6d88\u606f\u5230\u6307\u5b9a\u7684\u76ee\u7684\u5730\uff0c\u4e3b\u9898\u6216\u961f\u5217\u3002\u652f\u6301\u4e09\u79cd\u65b9\u5f0f\uff1a\u540c\u6b65\uff0c\u5f02\u6b65\u548c\u5355\u5411\u3002\n\t<\/li>\n<li>\n\t\tSequenceProducer\uff0c\u4e13\u6ce8\u4e8e\u901f\u5ea6\uff0c\u5b9e\u73b0\u53ef\u4ee5\u91c7\u7528\u6279\u5904\u7406\u65b9\u5f0f\uff0c\u53d1\u9001\u591a\u4e2a\u6d88\u606f\uff0c\u7136\u540e\u4e00\u6b21\u63d0\u4ea4\u3002\n\t<\/li>\n<\/ul>\n<h2>\n\tCONSUMER&nbsp;\u6d88\u8d39\u8005<br \/>\n<\/h2>\n<p>\n\t<a href=\"https:\/\/www.xttblog.com\/?tag=openmessaging\" name=\"openmessaging\" target=\"_blank\" title=\"openmessaging\">openmessaging<\/a>\u5b9a\u4e49\u4e86\u4e24\u79cdConsumer\uff1aPullConsumer\uff0cPushConsumer\u548cStreamingConsumer\u3002\u6bcf\u4e2a\u6d88\u8d39\u8005\u53ea\u652f\u6301\u4eceQueue\u6d88\u8d39\u6d88\u606f\u3002\n<\/p>\n<ul>\n<li>\n\t\tPullConsumer\u4ece\u6307\u5b9a\u7684\u961f\u5217\u4e2d\u63d0\u53d6\u6d88\u606f\uff0c\u652f\u6301\u968f\u65f6\u901a\u8fc7\u786e\u8ba4\u63d0\u4ea4\u6d88\u8d39\u7ed3\u679c\u3002\u4e00\u4e2aPullConsumer\u53ea\u80fd\u4ece\u4e00\u4e2a\u56fa\u5b9a\u961f\u5217\u4e2d\u63d0\u53d6\u6d88\u606f\u3002\n\t<\/li>\n<li>\n\t\tPushConsumer\u4ece\u591a\u4e2a\u961f\u5217\u63a5\u6536\u6d88\u606f\uff0c\u8fd9\u4e9b\u6d88\u606f\u4eceMOM\u670d\u52a1\u5668\u63a8\u9001\u3002PushConsumer\u53ef\u4ee5\u4f7f\u7528\u5355\u72ec\u7684MessageListener\u9644\u52a0\u5230\u591a\u4e2a\u961f\u5217\uff0c\u5e76\u968f\u65f6\u901a\u8fc7ReceivedMessageContext\u63d0\u4ea4\u6d88\u8d39\u7ed3\u679c\u3002\n\t<\/li>\n<li>\n\t\tStreamingConsumer\u662f\u4e00\u79cd\u5168\u65b0\u7684\u6d88\u8d39\u7c7b\u578b\uff0c\u9762\u5411\u6d41\u7684\u6d88\u8d39\u8005\uff0c\u53ef\u8f7b\u677e\u5c06\u6d88\u606f\u7cfb\u7edf\u4e0eStreaming \/ BigData\u76f8\u5173\u7684\u5e73\u53f0\u96c6\u6210\u5728\u4e00\u8d77\u3002StreamingConsumer\u652f\u6301\u6d88\u8017\u6765\u81ea\u6307\u5b9a\u961f\u5217\u7684\u6d88\u606f\uff0c\u5982\u8fed\u4ee3\u5668\u3002\n\t<\/li>\n<\/ul>\n<h2>\n\tTOPIC QUEUE AND ROUTING&nbsp;\u4e3b\u9898\u961f\u5217\u548c\u8def\u7531<br \/>\n<\/h2>\n<p>\n\t\u8fd9\u4e09\u4e2a\u6982\u5ff5\u662f\u7d27\u5bc6\u76f8\u8fde\u7684\uff0c\u867d\u7136\u4e3b\u9898\u548c\u961f\u5217\u6709\u4e0d\u540c\u7684\u8d23\u4efb\uff0c\u4f46\u4ed6\u4eec\u5374\u5f88\u6df7\u4e71\u3002\n<\/p>\n<ul>\n<li>\n\t\t\u4e3b\u9898\uff0c\u539f\u59cb\u4fe1\u606f\u7684\u8f7d\u4f53\uff0c\u8d1f\u8d23\u6301\u6709\u4fe1\u606f\u3002\u4e3b\u9898\u4e2d\u7684\u6d88\u606f\u5206\u53d1\u548c\u987a\u5e8f\u672a\u5b9a\u4e49\u3002\n\t<\/li>\n<\/ul>\n<h2>\n\tROUTING&nbsp;\u8def\u7531<br \/>\n<\/h2>\n<p>\n\t\u4e3b\u9898\u4e2d\u7684\u4fe1\u606f\u662f\u539f\u59cb\u7684\uff0c\u7b49\u5f85\u5904\u7406\uff0c\u59cb\u7ec8\u65e0\u6cd5\u5524\u8d77\u6d88\u8d39\u8005\u7684\u5229\u76ca\u3002\u603b\u800c\u8a00\u4e4b\uff0c\u4e3b\u9898\u4e2d\u7684\u6d88\u606f\u662f\u4ee5\u751f\u4ea7\u8005\u4e3a\u5bfc\u5411\uff0c\u800c\u4e0d\u662f\u4ee5\u6d88\u8d39\u8005\u4e3a\u5bfc\u5411\u3002\n<\/p>\n<p>\n\t\u56e0\u6b64\uff0c\u8def\u7531\u8d1f\u8d23\u5904\u7406\u4e3b\u9898\u4e2d\u7684\u539f\u59cb\u6d88\u606f\uff0c\u5e76\u8def\u7531\u5230\u961f\u5217\u3002\u6bcf\u4e2a\u8def\u7531\u90fd\u6709\u4e00\u4e2a\u8fd0\u8425\u5546\u7ba1\u9053\uff0c\u7531\u4e00\u7cfb\u5217\u8fd0\u8425\u5546\u7ec4\u6210\u3002\u6d88\u606f\u5c06\u4ece\u4e3b\u9898\u548c\u961f\u5217\u6d41\u7ecf\u64cd\u4f5c\u5458\u7ba1\u9053\u3002\n<\/p>\n<p>\n\t\u64cd\u4f5c\u5458\u7528\u4e8e\u5904\u7406\u8def\u7531\u4e2d\u6d41\u52a8\u7684\u6d88\u606f\u3002\u64cd\u4f5c\u5458\uff0c\u8868\u8fbe\u5f0f\u8fd0\u7b97\u7b26\uff0c\u91cd\u590d\u6570\u636e\u5220\u9664\u5668\u64cd\u4f5c\u7b26\uff0cjoiner\u64cd\u4f5c\u7b26\uff0c\u8fc7\u6ee4\u5668\u64cd\u4f5c\u7b26\uff0crpc\u64cd\u4f5c\u7b26\u7b49\u90fd\u6709\u5f88\u591a\u79cd\u7c7b\u3002\n<\/p>\n<p>\n\t\u66f4\u91cd\u8981\u7684\u662f\uff1f\u8def\u7531\u53ef\u4ee5\u8de8\u8d8a\u7f51\u7edc\uff0c\u6d88\u606f\u53ef\u4ee5\u4ece\u7f51\u7edc\u5206\u533a\u8def\u7531\u5230\u53e6\u4e00\u4e2a\u5206\u533a\u3002\n<\/p>\n<h2>\n\tQUEUE \u961f\u5217<br \/>\n<\/h2>\n<p>\n\t\u6d88\u606f\u5df2\u7ecf\u8def\u7531\u5230\u961f\u5217\uff0c\u73b0\u5728\u53ef\u4ee5\u88ab\u6d88\u8d39\u8005\u4f7f\u7528\u3002\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u961f\u5217\u5e94\u5206\u4e3a\u5206\u533a\uff0c\u6d88\u606f\u5c06\u901a\u8fc7MessageHeader\uff03SHARDING_KEY\u8def\u7531\u5230\u6307\u5b9a\u7684\u5206\u533a\u3002\n<\/p>\n<p>\n\t\u961f\u5217\u4e5f\u76f4\u63a5\u4ece\u5236\u7247\u4eba\u63a5\u6536\u6d88\u606f\uff0c\u6709\u65f6\u5019\uff0c\u6211\u4eec\u5e0c\u671b\u4ece\u751f\u4ea7\u8005\u5230\u6d88\u8d39\u8005\u7684\u6700\u77ed\u8def\u5f84\uff0c\u4ee5\u5b9e\u73b0\u6027\u80fd\u3002\n<\/p>\n<h2>\n\tTOPIC VS QUEUE \u4e3b\u9898\u4e0e\u961f\u5217<br \/>\n<\/h2>\n<p>\n\t\u4e3b\u9898\u548c\u961f\u5217\u90fd\u662f\u90ae\u4ef6\u7684\u8f7d\u4f53\u3002\u4e3b\u9898\u662f\u9762\u5411\u751f\u4ea7\u8005\uff0c\u800cQueue\u5219\u4ee5\u6d88\u8d39\u8005\u4e3a\u5bfc\u5411\u3002\u4e3b\u9898\u4e2d\u7684\u6d88\u606f\u6765\u81ea\u751f\u4ea7\u8005\uff0c\u800c\u961f\u5217\u4e2d\u7684\u6d88\u606f\u6765\u81ea\u4e3b\u9898\u6216\u751f\u4ea7\u8005\u3002\u961f\u5217\u5206\u4e3a\u5206\u533a\uff0c\u800c\u4e3b\u9898\u66f2\u5219\u672a\u5b9a\u4e49\u3002\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u961f\u5217\u662f\u4e3b\u9898\u7684\u4e00\u5c0f\u90e8\u5206\u3002\u521b\u5efa\u6216\u9500\u6bc1\u961f\u5217\u5f88\u5bb9\u6613\uff0c\u751f\u4ea7\u8005\u65e0\u5173\u7d27\u8981\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=2164\">openmessaging\u67b6\u6784\u539f\u7406\u89e3\u6790<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>openmessaging&nbsp;\u6784\u5efa\u5206\u5e03\u5f0f\u6d88\u606f\u4f20\u9012\u7684\u5f00\u653e\u6807\u51c6\u3002\u53e3\u53f7\u54cd\u4eae\uff0c\u5382\u5546\u4f17\u591a\uff0copenmessagi [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[69,1538,1541],"class_list":["post-2164","post","type-post","status-publish","format-standard","hentry","category-java","tag-java","tag-openmessaging","tag-rocketmq"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2164"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2164\/revisions"}],"predecessor-version":[{"id":2165,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2164\/revisions\/2165"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}