浣犵煡閬撶殑瓒婂锛屼綘涓嶇煡閬撶殑瓒婂
鐐硅禐鍐嶇湅锛屽吇鎴愪範鎯�
鏈枃GitHub https://github.com/JavaFamily 宸叉敹褰曪紝鏈変竴绾垮ぇ鍘傞潰璇曠偣鑴戝浘銆佷釜浜鸿仈绯绘柟寮忓拰鎶�鏈氦娴佺兢锛屾杩嶴tar鍜屾寚鏁�
鎴戝府闃块噷浜戞帹骞挎湇鍔″櫒89/骞达紝229/3骞达紝涔版潵閫佽嚜宸憋紝閫佸コ鏈嬪弸椹笂杩囧勾鍐嶅悎閫備笉杩囦簡锛屼拱浜嗘惌寤轰釜椤圭洰缁欓潰璇曞畼鐪嬩篃棣欙紝杩樺彲浠ョ啛鎮夋妧鏈爤锛屾垜鏄庡ぉ浼氬嚭涓�涓湇鍔″櫒鎼缓涓汉椤圭洰鐨勬暀绋嬨�傛壂鐮佹垨鑰呯偣鍑昏喘涔�
鍓嶈█
娑堟伅闃熷垪鍦ㄤ簰鑱旂綉鎶�鏈瓨鍌ㄦ柟闈娇鐢ㄥ姝ゅ箍娉涳紝鍑犱箮鎵�鏈夌殑鍚庣鎶�鏈潰璇曞畼閮借鍦�娑堟伅闃熷垪鐨勪娇鐢ㄥ拰鍘熺悊鏂归潰瀵瑰皬浼欎即浠繘琛�360掳鐨勫垇闅俱��
浣滀负涓�涓湪浜掕仈缃戝叕鍙搁潰涓�娆℃嬁涓�娆ffer鐨勯潰闇革紝鎵撹触浜嗘棤鏁扮珵浜夊鎵嬶紝姣忔閮藉彧鑳界湅鍒版棤鏁拌惤瀵炵殑韬奖澶辨湜鐨勭寮�锛岀暐鎰熸劎鐤氾紙璇峰厑璁告垜浣跨敤涓�涓嬪じ寮犵殑淇緸鎵嬫硶锛夈��
浜庢槸鍦ㄤ竴涓瘋瀵為毦鑰愮殑澶滄櫄锛屾垜鐥涘畾鎬濈棝锛屽喅瀹氬紑濮嬪啓銆婂悐鎵撻潰璇曞畼銆�绯诲垪锛屽笇鏈涜兘甯姪鍚勪綅璇昏�呬互鍚庨潰璇曞娍濡傜牬绔癸紝瀵归潰璇曞畼杩涜360掳鐨勫弽鍑伙紝鍚婃墦闂綘鐨勯潰璇曞畼锛岃涓�鍚岄潰璇曠殑鍚屽儦鐬犵洰缁撹垖锛岀柉鐙傛敹鍓插ぇ鍘侽ffer锛�
鎹炰竴涓�
娑堟伅闃熷垪绯诲垪鍓嶉潰涓ょ珷鍒嗗埆璁蹭簡娑堟伅闃熷垪鐨勫熀纭�鐭ヨ瘑锛岃繕鏈夋瘮杈冨父瑙佺殑闂鍜屽父瑙佸垎甯冨紡浜嬪姟瑙e喅鏂规锛岄偅涔堝湪瀹為檯寮�鍙戣繃绋嬩腑,鎴戜滑浣跨敤棰戠巼姣旇緝楂樼殑娑堟伅闃熷垪涓棿浠舵湁鍝簺鍛紵
甯呬笝鎴戝伐浣滀互鏉ユ帴瑙︾殑娑堟伅闃熷垪涓棿浠舵湁RocketMQ銆�Kafka銆�鑷爺锛屾槸鐨勫洜涓烘垜涓昏鎺ヨЕ鐨勯兘鏄數鍟嗗叕鍙革紝鐩稿鑰岃█涓氬姟浣撻噺杩樻湁鍦烘櫙鏉ヨ閮芥槸浠栦滑姣旇緝閫傚悎锛屽啀鍔犱笂鏉窞闃块噷绯诲叕鍙稿亸澶氾紝韬竟鍚屼簨鎴栬�呭叕鍙歌�佸ぇ鍩烘湰閮芥槸闃块噷鍑烘潵鍒涗笟鐨勶紝閭e湪浣跨敤鎶�鏈爤鐨勬椂鍊�闃块噷绯荤殑寮�婧愭鏋�涔熷氨鎴愪簡棣栭�夈��
灏辩畻鏄嚜鐮旂殑涓棿浠跺澶氬皯灏戜篃鏄�熼壌RocketMQ銆並afka鐨勪紭鐐硅嚜鐮旂殑锛岄偅鎴戝悗闈袱绔犲氨鍒嗗埆绠�鍗曠殑浠嬬粛涓嬩袱鑰咃紝浠栦滑鍒嗗埆鍦ㄤ笟鍔″満鏅拰澶ф暟鎹鍩熷悇鑷彂鍏夊彂鐑��
閭e埌搴曟槸閬撳痉鐨勬拨涓э紝杩樻槸浜烘�х殑娉伃锛岃鎴戜滑璺熺潃鏁栦笝璧拌繘RocketMQ鐨勫唴蹇冧笘鐣屻��
姝f枃
RocketMQ绠�浠�
RocketMQ鏄竴涓函Java銆佸垎甯冨紡銆侀槦鍒楁ā鍨嬬殑寮�婧愭秷鎭腑闂翠欢锛屽墠韬槸MetaQ锛屾槸闃块噷鍙傝�僈afka鐗圭偣鐮斿彂鐨勪竴涓槦鍒楁ā鍨嬬殑娑堟伅涓棿浠讹紝鍚庡紑婧愮粰apache鍩洪噾浼氭垚涓轰簡apache鐨勯《绾у紑婧愰」鐩紝鍏锋湁楂樻�ц兘銆侀珮鍙潬銆侀珮瀹炴椂銆佸垎甯冨紡鐗圭偣銆�
鎴戜滑鍐嶇湅涓嬮樋閲岀粰浠栧彇鐨勫悕瀛楀搱锛�Rocket 鐏 闃块噷杩欐槸甯屾湜浠栦笂澶╁憖锛屼笉杩囨垜瑙夊緱杩欎釜鍚嶅瓧纭疄鎸洪叿鐨勩��
鎴戜滑鍏堢湅鐪嬩粬鏈�鏂扮殑瀹樼綉
鍥為【涓�涓嬩粬鐨勫績璺巻绋�
2007骞�锛氭窐瀹濆疄鏂戒簡鈥滀簲褰╃煶鈥濋」鐩紝鈥滀簲褰╃煶鈥濈敤浜庡皢浜ゆ槗绯荤粺浠庡崟鏈哄彉鎴愬垎甯冨紡锛屼篃鏄湪杩欎釜杩囩▼涓骇鐢熶簡闃块噷宸村反绗竴浠f秷鎭紩鎿庘�斺�擭otify銆�
2010骞�锛氶樋閲屽反宸碆2B閮ㄩ棬鍩轰簬ActiveMQ鐨�5.1鐗堟湰涔熷紑鍙戜簡鑷繁鐨勪竴娆炬秷鎭紩鎿庯紝绉颁负Napoli锛岃繖娆炬秷鎭紩鎿庡湪B2B閲岄潰骞挎硾鍦拌浣跨敤锛屼笉浠呬粎鏄湪浜ゆ槗棰嗗煙锛屽湪寰堝鐨勫悗鍙板紓姝ヨВ鑰︾瓑鏂归潰涔熷緱鍒颁簡骞挎硾鐨勫簲鐢ㄣ��
2011骞�锛氫笟鐣屽嚭鐜颁簡鐜板湪琚緢澶氬ぇ鏁版嵁棰嗗煙鎵�鎺ㄥ磭鐨凨afka娑堟伅寮曟搸锛岄樋閲屽反宸村湪鐮旂┒浜咾afka鐨勬暣浣撴満鍒跺拰鏋舵瀯璁捐涔嬪悗锛屽熀浜嶬afka鐨勮璁′娇鐢↗ava杩涜浜嗗畬鍏ㄩ噸鍐欏苟鎺ㄥ嚭浜�MetaQ 1.0鐗堟湰锛屼富瑕佹槸鐢ㄤ簬瑙e喅椤哄簭娑堟伅鍜屾捣閲忓爢绉殑闂銆�
2012骞�锛氶樋閲屽反宸村紑婧愬叾鑷爺鐨勭涓変唬鍒嗗竷寮忔秷鎭腑闂翠欢鈥斺��RocketMQ銆�
缁忚繃鍑犲勾鐨勬妧鏈墦纾紝闃块噷绉板熀浜嶳ocketMQ鎶�鏈紝鐩墠鍙屽崄涓�褰撳ぉ娑堟伅瀹归噺鍙揪鍒颁竾浜跨骇銆�
2016骞�11鏈�锛氶樋閲屽皢RocketMQ鎹愮尞缁�Apache杞欢鍩洪噾浼氾紝姝e紡鎴愪负瀛靛寲椤圭洰銆�
闃块噷绉颁細灏嗗叾鎵撻�犳垚椤剁骇椤圭洰銆�杩欐槸闃块噷杩堝嚭鐨勪竴澶ф锛屽洜涓哄姞鍏ュ埌寮�婧愯蒋浠跺熀閲戜細闇�瑕佺粡杩囪瘎瀹℃柟鐨勮�冩牳涓庤瀵熴��
鍧︾巼鑰岃█锛屼笟鐣岃繕瀵瑰浗浜虹殑浠g爜寮�婧愬弬涓庡害浠嶄繚鎸佺潃鍒绘澘鍗拌薄锛涜�孉pache鍩洪噾浼氫腑鐨�342涓」鐩腑锛屾殏鏃惰繕鍙湁Kylin銆丆arbonData銆丒agle 銆丏ubbo鍜� RocketMQ 鍏辫浜斾釜涓浗鎶�鏈汉涓诲鐨勯」鐩��
2017骞�2鏈�20鏃�锛歊ocketMQ姝e紡鍙戝竷4.0鐗堟湰锛屼笓瀹剁О鏂扮増鏈�傜敤浜庣數鍟嗛鍩燂紝閲戣瀺棰嗗煙锛屽ぇ鏁版嵁棰嗗煙锛屽吋鏈夌墿鑱旂綉棰嗗煙鐨勭紪绋嬫ā鍨嬨��
浠ヤ笂灏辨槸RocketMQ鐨勬暣浣撳彂灞曞巻鍙诧紝鍏跺疄鍦ㄩ樋閲屽反宸村唴閮ㄥ洿缁曠潃RocketMQ鍐呮牳鎵撻�犱簡涓夋浜у搧锛屽垎鍒槸MetaQ銆�Notify鍜�Aliware MQ銆�
杩欎笁鑰呭垎鍒噰鐢ㄤ簡涓嶅悓鐨勬ā鍨嬶紝MetaQ涓昏浣跨敤浜嗘媺妯″瀷锛岃В鍐充簡椤哄簭娑堟伅鍜屾捣閲忓爢绉棶棰橈紱Notify涓昏浣跨敤浜嗘帹妯″瀷锛岃В鍐充簡浜嬪姟娑堟伅锛涜�屼簯浜у搧Aliware MQ鍒欐槸鎻愪緵浜嗗晢涓氬寲鐨勭増鏈��
缁忓巻澶氭鍙�11娲楃ぜ鐨勮嫳闆�
鍦ㄥ鎴�2016骞村弻鍗佷竴鏃讹紝RocketMq鍥㈤槦閲嶇偣鍋氫簡涓や欢浜嬫儏锛屼紭鍖栨參璇锋眰涓庣粺涓�瀛樺偍寮曟搸銆�
- 浼樺寲鎱㈣姹�锛氳繖閲屼富瑕佹槸瑙e喅鍦ㄦ捣閲忛珮骞跺彂鍦烘櫙涓嬮檷浣庢參璇锋眰瀵规暣涓泦缇ゅ甫鏉ョ殑鎶栧姩锛�姣涘埡闂銆傝繖鏄竴涓瀬鍏锋寫鎴樼殑鎶�鏈椿锛屽洟闃熷悓瀛︾粡杩囬暱杈�1涓鏈堢殑璺熻繘璋冧紭锛屼粠鍙屽崄涓�鐨勫鐩樻儏鍐垫潵鐪嬶紝99.996%鐨勫欢杩熻惤鍦ㄤ簡10ms浠ュ唴锛�鑰�99.6%鐨勫欢杩熷湪1ms浠ュ唴銆備紭鍖栦富瑕侀泦涓湪RocketMQ瀛樺偍灞傜畻娉曚紭鍖栥�丣VM涓庢搷浣滅郴缁熻皟浼樸�傛洿澶氱殑缁嗚妭澶у鍙互鍙傝�冦�婁竾浜跨骇鏁版嵁娲嘲涓嬬殑鍒嗗竷寮忔秷鎭紩鎿庛�嬨��
- 缁熶竴瀛樺偍寮曟搸锛氫富瑕佽В鍐崇殑娑堟伅寮曟搸鐨勯珮鍙敤锛屾垚鏈棶棰樸�傚湪澶氫唬娑堟伅寮曟搸鍏卞瓨鐨勫墠鎻愪笅锛屾垜浠Notify鐨勫瓨鍌ㄦā鍧楄繘琛屼簡鍏ㄩ潰绉绘涓庢浛鎹€��
RocketMQ澶╃敓涓洪噾铻嶄簰鑱旂綉棰嗗煙鑰岀敓锛岃拷姹傞珮鍙潬銆侀珮鍙敤銆侀珮骞跺彂銆佷綆寤惰繜锛屾槸涓�涓樋閲屽反宸寸敱鍐呰�屽鎴愬姛瀛曡偛鐨勫吀鑼冿紝闄や簡闃块噷闆嗗洟涓婂崈涓簲鐢ㄥ锛屾牴鎹垜浠笉瀹屽叏缁熻锛屽浗鍐呰嚦灏戞湁涓婄櫨瀹跺崟浣嶃�佺鐮旀暀鑲叉満鏋勫湪浣跨敤銆�
RocketMQ鍦ㄩ樋閲岄泦鍥篃琚箍娉涘簲鐢ㄥ湪璁㈠崟锛屼氦鏄擄紝鍏呭�硷紝娴佽绠楋紝娑堟伅鎺ㄩ�侊紝鏃ュ織娴佸紡澶勭悊锛�binglog鍒嗗彂绛夊満鏅��
浠栨墍鎷ユ湁鐨勫姛鑳�
鎴戜滑鐩存帴鍘�GitHub涓婄湅Apache瀵逛粬鐨勬弿杩板彲鑳戒細濂界偣
鏄殑鍔熻兘瀹屾暣鍒扮垎鐐稿熀鏈笂寮�鍙戝畬鍏ㄥ鐢紝浠�涔堬紵鐪嬩笉鎳備笓涓氳瘝姹囩殑鑻辨枃锛�
甯呬笝鏄殩鐢锋潵鐨勫槢锛屼腑鏂囧姛鑳藉涓� 鈫�
- 鍙戝竷/璁㈤槄娑堟伅浼犻�掓ā鍨�
- 璐㈠姟绾т氦鏄撴秷鎭�
- 鍚勭璺ㄨ瑷�瀹㈡埛绔紝渚嬪Java锛孋 / C ++锛孭ython锛孏o
- 鍙彃鎷旂殑浼犺緭鍗忚锛屼緥濡俆CP锛孲SL锛孉IO
- 鍐呯疆鐨勬秷鎭窡韪姛鑳斤紝杩樻敮鎸佸紑鏀惧紡璺熻釜
- 澶氬姛鑳界殑澶ф暟鎹拰娴佺敓鎬佺郴缁熼泦鎴�
- 鎸夋椂闂存垨鍋忕Щ閲忚拷婧秷鎭�
- 鍙潬鐨凢IFO鍜屼弗鏍肩殑鏈夊簭娑堟伅浼犻�掑湪鍚屼竴闃熷垪涓�
- 楂樻晥鐨勬帹鎷夋秷璐规ā鍨�
- 鍗曚釜闃熷垪涓殑鐧句竾绾ф秷鎭疮绉閲�
- 澶氱娑堟伅浼犻�掑崗璁紝渚嬪JMS鍜孫penMessaging
- 鐏垫椿鐨勫垎甯冨紡妯悜鎵╁睍閮ㄧ讲鏋舵瀯
- 蹇闂數鐨勬壒閲忔秷鎭氦鎹㈢郴缁�
- 鍚勭娑堟伅杩囨护鍣ㄦ満鍒讹紝渚嬪SQL鍜孴ag
- 鐢ㄤ簬闅旂娴嬭瘯鍜屼簯闅旂缇ら泦鐨凞ocker鏄犲儚
- 鍔熻兘涓板瘜鐨勭鐞嗕华琛ㄦ澘锛岀敤浜庨厤缃紝鎸囨爣鍜岀洃瑙�
- 璁よ瘉涓庢巿鏉�
浠栫殑椤圭洰缁撴瀯缁勬垚鏄�庝箞鏍峰瓙鐨勶紵
GitHub鍦板潃锛歨ttps://github.com/apache/rocketmq
浠栫殑鏍稿績妯″潡锛�
- rocketmq-broker锛氭帴鍙楃敓浜ц�呭彂鏉ョ殑娑堟伅骞跺瓨鍌紙閫氳繃璋冪敤rocketmq-store锛夛紝娑堣垂鑰呬粠杩欓噷鍙栧緱娑堟伅
- rocketmq-client锛氭彁渚涘彂閫併�佹帴鍙楁秷鎭殑瀹㈡埛绔疉PI銆�
- rocketmq-namesrv锛歂ameServer锛岀被浼间簬Zookeeper锛岃繖閲屼繚瀛樼潃娑堟伅鐨凾opicName锛岄槦鍒楃瓑杩愯鏃剁殑鍏冧俊鎭��
- rocketmq-common锛氶�氱敤鐨勪竴浜涚被锛屾柟娉曪紝鏁版嵁缁撴瀯绛夈��
- rocketmq-remoting锛氬熀浜嶯etty4鐨刢lient/server + fastjson搴忓垪鍖� + 鑷畾涔変簩杩涘埗鍗忚銆�
- rocketmq-store锛氭秷鎭�佺储寮曞瓨鍌ㄧ瓑銆�
- rocketmq-filtersrv锛氭秷鎭繃婊ゅ櫒Server锛岄渶瑕佹敞鎰忕殑鏄紝瑕佸疄鐜拌繖绉嶈繃婊わ紝闇�瑕佷笂浼犱唬鐮佸埌MQ锛侊紙涓�鑸�岃█锛屾垜浠埄鐢═ag瓒充互婊¤冻澶ч儴鍒嗙殑杩囨护闇�姹傦紝濡傛灉鏇寸伒娲绘洿澶嶆潅鐨勮繃婊ら渶姹傦紝鍙互鑰冭檻filtersrv缁勪欢锛夈��
- rocketmq-tools锛氬懡浠よ宸ュ叿銆�
浠栫殑鏋舵瀯缁勬垚锛屾垨鑰呯悊瑙d负涓轰粈涔堜粬杩欎箞蹇紵杩欎箞寮猴紵杩欎箞鍘夊锛�
浠栦富瑕佹湁鍥涘ぇ鏍稿績缁勬垚閮ㄥ垎锛�NameServer銆�Broker銆�Producer浠ュ強Consumer鍥涢儴鍒嗐��
Tip锛氭垜浠彲浠ョ湅鍒�RocketMQ鍟ラ兘鏄�闆嗙兢閮ㄧ讲鐨勶紝杩欐槸浠�鍚炲悙閲忓ぇ锛�楂樺彲鐢�鐨勫師鍥犱箣涓�锛岄泦缇ょ殑妯″紡涔熷緢鑺卞摠锛屽彲浠ユ敮鎸佸master 妯″紡銆佸master澶歴lave寮傛澶嶅埗妯″紡銆佸 master澶歴lave鍚屾鍙屽啓妯″紡銆�
鑰屼笖杩欎釜妯″紡濂藉儚Kafka鍟婏紒锛堟垜杩欓噷鏄簾璇濓紝鏈韩灏辨槸闃块噷鍩轰簬Kafka鐨勫緢澶氱壒鎬х爺鍙戠殑锛夈��
鍒嗗埆浠嬬粛涓嬪悇涓泦缇ょ粍鎴愰儴鍒嗗惂
NameServer锛�
涓昏璐熻矗瀵逛簬婧愭暟鎹殑绠$悊锛屽寘鎷簡瀵逛簬Topic鍜岃矾鐢变俊鎭殑绠$悊銆�
NameServer鏄竴涓姛鑳介綈鍏ㄧ殑鏈嶅姟鍣紝鍏惰鑹茬被浼糄ubbo涓殑Zookeeper锛屼絾NameServer涓嶼ookeeper鐩告瘮鏇磋交閲忋�備富瑕佹槸鍥犱负姣忎釜NameServer鑺傜偣浜掔浉涔嬮棿鏄嫭绔嬬殑锛屾病鏈変换浣曚俊鎭氦浜掋��
NameServer鍘嬪姏涓嶄細澶ぇ锛屽钩鏃朵富瑕佸紑閿�鏄湪缁存寔蹇冭烦鍜屾彁渚汿opic-Broker鐨勫叧绯绘暟鎹��
浣嗘湁涓�鐐归渶瑕佹敞鎰忥紝Broker鍚慛ameServer鍙戝績璺虫椂锛� 浼氬甫涓婂綋鍓嶈嚜宸辨墍璐熻矗鐨勬墍鏈�Topic淇℃伅锛屽鏋�Topic涓暟澶锛堜竾绾у埆锛夛紝浼氬鑷翠竴娆″績璺充腑锛屽氨Topic鐨勬暟鎹氨鍑犲崄M锛岀綉缁滄儏鍐靛樊鐨勮瘽锛� 缃戠粶浼犺緭澶辫触锛屽績璺冲け璐ワ紝瀵艰嚧NameServer璇涓築roker蹇冭烦澶辫触銆�
NameServer 琚璁℃垚鍑犱箮鏃犵姸鎬佺殑锛屽彲浠ユí鍚戞墿灞曪紝鑺傜偣涔嬮棿鐩镐簰涔嬮棿鏃犻�氫俊锛岄�氳繃閮ㄧ讲澶氬彴鏈哄櫒鏉ユ爣璁拌嚜宸辨槸涓�涓吉闆嗙兢銆�
姣忎釜 Broker 鍦ㄥ惎鍔ㄧ殑鏃跺�欎細鍒� NameServer 娉ㄥ唽锛孭roducer 鍦ㄥ彂閫佹秷鎭墠浼氭牴鎹� Topic 鍒� NameServer 鑾峰彇鍒� Broker 鐨勮矾鐢变俊鎭紝Consumer 涔熶細瀹氭椂鑾峰彇 Topic 鐨勮矾鐢变俊鎭��
鎵�浠ヤ粠鍔熻兘涓婄湅NameServer搴旇鏄拰 ZooKeeper 宸笉澶氾紝鎹 RocketMQ 鐨勬棭鏈熺増鏈‘瀹炴槸浣跨敤鐨� ZooKeeper 锛屽悗鏉ユ敼涓轰簡鑷繁瀹炵幇鐨� NameServer 銆�
鎴戜滑鐪嬩竴涓�Dubbo涓敞鍐屼腑蹇冪殑瑙掕壊锛屾槸涓嶆槸鐪熺殑涓�姣涗竴鏍凤紝甯堝嚭鍚岄棬鐩镐技鐐圭湡鐨勫緢澶氾細
Producer
娑堟伅鐢熶骇鑰咃紝璐熻矗浜х敓娑堟伅锛屼竴鑸敱涓氬姟绯荤粺璐熻矗浜х敓娑堟伅銆�
Producer鐢辩敤鎴疯繘琛屽垎甯冨紡閮ㄧ讲锛屾秷鎭敱Producer閫氳繃澶氱璐熻浇鍧囪 妯″紡鍙戦�佸埌Broker闆嗙兢锛屽彂閫佷綆寤舵椂锛屾敮鎸佸揩閫熷け璐ャ��
RocketMQ 鎻愪緵浜嗕笁绉嶆柟寮忓彂閫佹秷鎭細鍚屾銆佸紓姝ュ拰鍗曞悜
鍚屾鍙戦��锛氬悓姝ュ彂閫佹寚娑堟伅鍙戦�佹柟鍙戝嚭鏁版嵁鍚庝細鍦ㄦ敹鍒版帴鏀舵柟鍙戝洖鍝嶅簲涔嬪悗鎵嶅彂涓嬩竴涓暟鎹寘銆備竴鑸敤浜庨噸瑕侀�氱煡娑堟伅锛屼緥濡傞噸瑕侀�氱煡閭欢銆佽惀閿�鐭俊銆�
寮傛鍙戦��锛氬紓姝ュ彂閫佹寚鍙戦�佹柟鍙戝嚭鏁版嵁鍚庯紝涓嶇瓑鎺ユ敹鏂瑰彂鍥炲搷搴旓紝鎺ョ潃鍙戦�佷笅涓暟鎹寘锛屼竴鑸敤浜庡彲鑳介摼璺�楁椂杈冮暱鑰屽鍝嶅簲鏃堕棿鏁忔劅鐨勪笟鍔″満鏅紝渚嬪鐢ㄦ埛瑙嗛涓婁紶鍚庨�氱煡鍚姩杞爜鏈嶅姟銆�
鍗曞悜鍙戦��锛氬崟鍚戝彂閫佹槸鎸囧彧璐熻矗鍙戦�佹秷鎭�屼笉绛夊緟鏈嶅姟鍣ㄥ洖搴斾笖娌℃湁鍥炶皟鍑芥暟瑙﹀彂锛岄�傜敤浜庢煇浜涜�楁椂闈炲父鐭絾瀵瑰彲闈犳�ц姹傚苟涓嶉珮鐨勫満鏅紝渚嬪鏃ュ織鏀堕泦銆�
Broker
娑堟伅涓浆瑙掕壊锛岃礋璐�瀛樺偍娑堟伅锛岃浆鍙戞秷鎭��
- Broker鏄叿浣撴彁渚涗笟鍔$殑鏈嶅姟鍣紝鍗曚釜Broker鑺傜偣涓庢墍鏈夌殑NameServer鑺傜偣淇濇寔闀胯繛鎺ュ強蹇冭烦锛屽苟浼氬畾鏃跺皢Topic淇℃伅娉ㄥ唽鍒癗ameServer锛岄『甯︿竴鎻愬簳灞傜殑閫氫俊鍜岃繛鎺ラ兘鏄�鍩轰簬Netty瀹炵幇鐨勩��
- Broker璐熻矗娑堟伅瀛樺偍锛屼互Topic涓虹含搴︽敮鎸佽交閲忕骇鐨勯槦鍒楋紝鍗曟満鍙互鏀拺涓婁竾闃熷垪瑙勬ā锛屾敮鎸佹秷鎭帹鎷夋ā鍨嬨��
- 瀹樼綉涓婃湁鏁版嵁鏄剧ず锛氬叿鏈�涓婁嚎绾ф秷鎭爢绉兘鍔�锛屽悓鏃跺彲涓ユ牸淇濊瘉娑堟伅鐨勬湁搴忔��銆�
Consumer
娑堟伅娑堣垂鑰咃紝璐熻矗娑堣垂娑堟伅锛屼竴鑸槸鍚庡彴绯荤粺璐熻矗寮傛娑堣垂銆�
Consumer涔熺敱鐢ㄦ埛閮ㄧ讲锛屾敮鎸丳USH鍜孭ULL涓ょ娑堣垂妯″紡锛屾敮鎸�闆嗙兢娑堣垂鍜�骞挎挱娑堟伅锛屾彁渚�瀹炴椂鐨勬秷鎭闃呮満鍒�銆�
Pull锛氭媺鍙栧瀷娑堣垂鑰咃紙Pull Consumer锛変富鍔ㄤ粠娑堟伅鏈嶅姟鍣ㄦ媺鍙栦俊鎭紝鍙鎵归噺鎷夊彇鍒版秷鎭紝鐢ㄦ埛搴旂敤灏变細鍚姩娑堣垂杩囩▼锛屾墍浠� Pull 绉颁负涓诲姩娑堣垂鍨嬨��
Push锛氭帹閫佸瀷娑堣垂鑰咃紙Push Consumer锛夊皝瑁呬簡娑堟伅鐨勬媺鍙栥�佹秷璐硅繘搴﹀拰鍏朵粬鐨勫唴閮ㄧ淮鎶ゅ伐浣滐紝灏嗘秷鎭埌杈炬椂鎵ц鐨勫洖璋冩帴鍙g暀缁欑敤鎴峰簲鐢ㄧ▼搴忔潵瀹炵幇銆傛墍浠� Push 绉颁负琚姩娑堣垂绫诲瀷锛屼絾浠庡疄鐜颁笂鐪嬭繕鏄粠娑堟伅鏈嶅姟鍣ㄤ腑鎷夊彇娑堟伅锛屼笉鍚屼簬 Pull 鐨勬槸 Push 棣栧厛瑕佹敞鍐屾秷璐圭洃鍚櫒锛屽綋鐩戝惉鍣ㄥ瑙﹀彂鍚庢墠寮�濮嬫秷璐规秷鎭��
娑堟伅棰嗗煙妯″瀷
Message
Message锛堟秷鎭級灏辨槸瑕佷紶杈撶殑淇℃伅銆�
涓�鏉℃秷鎭繀椤绘湁涓�涓富棰橈紙Topic锛夛紝涓婚鍙互鐪嬪仛鏄綘鐨勪俊浠惰閭瘎鐨勫湴鍧�銆�
涓�鏉℃秷鎭篃鍙互鎷ユ湁涓�涓彲閫夌殑鏍囩锛圱ag锛夊拰棰濆鐨勯敭鍊煎锛屽畠浠彲浠ョ敤浜庤缃竴涓笟鍔� Key 骞跺湪 Broker 涓婃煡鎵炬娑堟伅浠ヤ究鍦ㄥ紑鍙戞湡闂存煡鎵鹃棶棰樸��
Topic
Topic锛堜富棰橈級鍙互鐪嬪仛娑堟伅鐨勮绫伙紝瀹冩槸娑堟伅鐨勭涓�绾х被鍨嬨�傛瘮濡備竴涓數鍟嗙郴缁熷彲浠ュ垎涓猴細浜ゆ槗娑堟伅銆佺墿娴佹秷鎭瓑锛屼竴鏉℃秷鎭繀椤绘湁涓�涓� Topic 銆�
Topic 涓庣敓浜ц�呭拰娑堣垂鑰呯殑鍏崇郴闈炲父鏉炬暎锛屼竴涓� Topic 鍙互鏈�0涓��1涓�佸涓敓浜ц�呭悜鍏跺彂閫佹秷鎭紝涓�涓敓浜ц�呬篃鍙互鍚屾椂鍚戜笉鍚岀殑 Topic 鍙戦�佹秷鎭��
涓�涓� Topic 涔熷彲浠ヨ 0涓��1涓�佸涓秷璐硅�呰闃呫��
Tag
Tag锛堟爣绛撅級鍙互鐪嬩綔瀛愪富棰橈紝瀹冩槸娑堟伅鐨勭浜岀骇绫诲瀷锛岀敤浜庝负鐢ㄦ埛鎻愪緵棰濆鐨勭伒娲绘�с�備娇鐢ㄦ爣绛撅紝鍚屼竴涓氬姟妯″潡涓嶅悓鐩殑鐨勬秷鎭氨鍙互鐢ㄧ浉鍚� Topic 鑰屼笉鍚岀殑 Tag 鏉ユ爣璇嗐�傛瘮濡備氦鏄撴秷鎭張鍙互鍒嗕负锛氫氦鏄撳垱寤烘秷鎭�佷氦鏄撳畬鎴愭秷鎭瓑锛屼竴鏉℃秷鎭彲浠ユ病鏈� Tag 銆�
鏍囩鏈夊姪浜庝繚鎸佹偍鐨勪唬鐮佸共鍑�鍜岃繛璐紝骞朵笖杩樺彲浠ヤ负 RocketMQ 鎻愪緵鐨勬煡璇㈢郴缁熸彁渚涘府鍔┿��
Group
鍒嗙粍锛屼竴涓粍鍙互璁㈤槄澶氫釜Topic銆�
鍒嗕负ProducerGroup锛孋onsumerGroup锛屼唬琛ㄦ煇涓�绫荤殑鐢熶骇鑰呭拰娑堣垂鑰咃紝涓�鑸潵璇村悓涓�涓湇鍔″彲浠ヤ綔涓篏roup锛屽悓涓�涓狦roup涓�鑸潵璇村彂閫佸拰娑堣垂鐨勬秷鎭兘鏄竴鏍风殑
Queue
鍦�Kafka涓彨Partition锛屾瘡涓猀ueue鍐呴儴鏄湁搴忕殑锛屽湪RocketMQ涓垎涓鸿鍜屽啓涓ょ闃熷垪锛屼竴鑸潵璇磋鍐欓槦鍒楁暟閲忎竴鑷达紝濡傛灉涓嶄竴鑷村氨浼氬嚭鐜板緢澶氶棶棰樸��
Message Queue
Message Queue锛堟秷鎭槦鍒楋級锛屼富棰樿鍒掑垎涓轰竴涓垨澶氫釜瀛愪富棰橈紝鍗虫秷鎭槦鍒椼��
涓�涓� Topic 涓嬪彲浠ヨ缃涓秷鎭槦鍒楋紝鍙戦�佹秷鎭椂鎵ц璇ユ秷鎭殑 Topic 锛孯ocketMQ 浼氳疆璇㈣ Topic 涓嬬殑鎵�鏈夐槦鍒楀皢娑堟伅鍙戝嚭鍘汇��
娑堟伅鐨勭墿鐞嗙鐞嗗崟浣嶃�備竴涓猅opic涓嬪彲浠ユ湁澶氫釜Queue锛孮ueue鐨勫紩鍏ヤ娇寰楁秷鎭殑瀛樺偍鍙互鍒嗗竷寮忛泦缇ゅ寲锛屽叿鏈変簡姘村钩鎵╁睍鑳藉姏銆�
Offset
鍦�RocketMQ 涓紝鎵�鏈夋秷鎭槦鍒楅兘鏄寔涔呭寲锛岄暱搴︽棤闄愮殑鏁版嵁缁撴瀯锛屾墍璋撻暱搴︽棤闄愭槸鎸囬槦鍒椾腑鐨勬瘡涓瓨鍌ㄥ崟鍏冮兘鏄畾闀匡紝璁块棶鍏朵腑鐨勫瓨鍌ㄥ崟鍏冧娇鐢∣ffset 鏉ヨ闂紝Offset 涓� java long 绫诲瀷锛�64 浣嶏紝鐞嗚涓婂湪 100骞村唴涓嶄細婧㈠嚭锛屾墍浠ヨ涓烘槸闀垮害鏃犻檺銆�
涔熷彲浠ヨ涓� Message Queue 鏄竴涓暱搴︽棤闄愮殑鏁扮粍锛�Offset 灏辨槸涓嬫爣銆�
娑堟伅娑堣垂妯″紡
娑堟伅娑堣垂妯″紡鏈変袱绉嶏細Clustering锛堥泦缇ゆ秷璐癸級鍜�Broadcasting锛堝箍鎾秷璐癸級銆�
榛樿鎯呭喌涓嬪氨鏄泦缇ゆ秷璐癸紝璇ユā寮忎笅涓�涓秷璐硅�呴泦缇ゅ叡鍚屾秷璐逛竴涓富棰樼殑澶氫釜闃熷垪锛屼竴涓槦鍒楀彧浼氳涓�涓秷璐硅�呮秷璐癸紝濡傛灉鏌愪釜娑堣垂鑰呮寕鎺夛紝鍒嗙粍鍐呭叾瀹冩秷璐硅�呬細鎺ユ浛鎸傛帀鐨勬秷璐硅�呯户缁秷璐广��
鑰屽箍鎾秷璐规秷鎭細鍙戠粰娑堣垂鑰呯粍涓殑姣忎竴涓秷璐硅�呰繘琛屾秷璐广��
Message Order
Message Order锛堟秷鎭『搴忥級鏈変袱绉嶏細Orderly锛堥『搴忔秷璐癸級鍜�Concurrently锛堝苟琛屾秷璐癸級銆�
椤哄簭娑堣垂琛ㄧず娑堟伅娑堣垂鐨勯『搴忓悓鐢熶骇鑰呬负姣忎釜娑堟伅闃熷垪鍙戦�佺殑椤哄簭涓�鑷达紝鎵�浠ュ鏋滄鍦ㄥ鐞嗗叏灞�椤哄簭鏄己鍒舵�х殑鍦烘櫙锛岄渶瑕佺‘淇濅娇鐢ㄧ殑涓婚鍙湁涓�涓秷鎭槦鍒椼��
骞惰娑堣垂涓嶅啀淇濊瘉娑堟伅椤哄簭锛屾秷璐圭殑鏈�澶у苟琛屾暟閲忓彈姣忎釜娑堣垂鑰呭鎴风鎸囧畾鐨勭嚎绋嬫睜闄愬埗銆�
涓�娆″畬鏁寸殑閫氫俊娴佺▼鏄�庢牱鐨勶紵
Producer 涓� NameServer闆嗙兢涓殑鍏朵腑涓�涓妭鐐癸紙闅忔満閫夋嫨锛夊缓绔嬮暱杩炴帴锛屽畾鏈熶粠 NameServer 鑾峰彇 Topic 璺敱淇℃伅锛屽苟鍚戞彁渚� Topic 鏈嶅姟鐨� Broker Master 寤虹珛闀胯繛鎺ワ紝涓斿畾鏃跺悜 Broker 鍙戦�佸績璺炽��
Producer 鍙兘灏嗘秷鎭彂閫佸埌 Broker master锛屼絾鏄� Consumer 鍒欎笉涓�鏍凤紝瀹冨悓鏃跺拰鎻愪緵 Topic 鏈嶅姟鐨� Master 鍜� Slave寤虹珛闀胯繛鎺ワ紝鏃㈠彲浠ヤ粠 Broker Master 璁㈤槄娑堟伅锛屼篃鍙互浠� Broker Slave 璁㈤槄娑堟伅銆�
鍏蜂綋濡備笅鍥撅細
鎴戜笂闈㈣杩囦粬璺�Dubbo鍍忎笉鏄垜鐬庤鐨勶紝灏辫繛浠栫殑娉ㄥ唽杩囩▼閮藉緢鍍�Dubbo鐨勬湇鍔℃毚闇茶繃绋嬨��
鏄笉鏄寰楀緢绠�鍗曪紝浣嗘槸浣犲悓鏃朵篃浜х敓浜嗗ソ濂囧績锛屾瘡涓�姝ユ槸鎬庝箞鍒濆鍖栧惎鍔ㄧ殑鍛紵
甯呬笝鍛�灏辩煡閬撳ぇ瀹堕兘鏄�姹傜煡娆叉瀬寮虹殑浜烘墠锛岃繖涓嶆垜閮藉噯澶囧ソ浜嗭紝鎴戜滑涓�姝ユ鍒嗘瀽涓�涓嬨��
涓昏鏄汉鎵嶇兢閲岀殑浠旇姹傛垜鍐欏嚭鏉ャ�傘�傘��(鏂囨湯鏈夎繘缇ゆ柟寮�)
NameService鍚姩娴佺▼
鍦╫rg.apache.rocketmq.namesrv鐩綍涓嬬殑NamesrvStartup杩欎釜鍚姩绫诲熀鏈笂鎻忚堪浜嗕粬鐨勫惎鍔ㄨ繃绋嬫垜浠彲浠ョ湅涓�涓嬩唬鐮侊細
绗竴姝ユ槸鍒濆鍖栭厤缃�
鍒涘缓NamesrvController瀹炰緥锛屽苟寮�鍚袱涓畾鏃朵换鍔★細
姣忛殧10s鎵弿涓�娆�Broker锛岀Щ闄ゅ浜庝笉婵�娲荤殑Broker锛�
姣忛殧10s鎵撳嵃涓�娆V閰嶇疆銆�
绗笁姝ユ敞鍐岄挬瀛愬嚱鏁帮紝鍚姩鏈嶅姟鍣ㄥ苟鐩戝惉Broker銆�
NameService杩樻湁寰堝涓滆タ鐨勫搱鎴戣繖閲屽氨浠嬬粛浠栫殑鍚姩娴佺▼锛屽ぇ瀹惰繕鍙互鍘荤湅鐪嬩唬鐮侊紝杩樻槸寰堟湁鎰忔�濈殑锛屾瘮濡傝矾鐢辨敞鍐屼細鍙戦�佸績璺冲寘锛岃繕鏈�蹇冭烦鍖呯殑澶勭悊娴佺▼锛�璺敱鍒犻櫎锛�璺敱鍙戠幇绛夌瓑銆�
Tip锛氭湰鏉ユ垜鎯宠创寰堝婧愮爜鐨勶紝鍚庨潰璺�姝锛圝ava3y锛�璁ㄨ浜嗗緢涔呭仛鍑轰簡涓嶈创鐨勫喅瀹氾紝澶у鐞嗚В杩囩▼涓轰富锛佹垜涓昏鏄仛鍙槸鎵洸杩樻湁涓�浜涚棝鐐瑰垎鏋愬槢锛屾繁绌惰繕鏄緱澶у鑺辨椂闂达紝鎴戣鍟ラ兘浠嬬粛绡囧箙灏变笉澶熶簡銆�
Producer
閾捐矾寰堥暱娑夊強鐨勭粏鑺備篃澶氾紝鎴戝氨鍙戜竴涓嬮摼璺浘銆�
Producer鏄秷鎭彂閫佹柟锛岄偅浠栨�庝箞鍙戦�佺殑鍛紵
閫氳繃杞锛�Producer杞鏌愪釜Topic涓嬮潰鐨勬墍鏈夐槦鍒楀疄鐜板彂閫佹柟鐨勮礋杞藉潎琛�
Broker
Broker鍦≧ocketMQ涓槸杩涜澶勭悊Producer鍙戦�佹秷鎭姹傦紝Consumer娑堣垂娑堟伅鐨勮姹傦紝骞朵笖杩涜娑堟伅鐨勬寔涔呭寲锛屼互鍙奌A绛栫暐鍜屾湇鍔$杩囨护锛屽氨鏄泦缇や腑寰堥噸鐨勫伐浣滈兘鏄氦缁欎簡Broker杩涜澶勭悊銆�
Broker妯″潡鏄�氳繃BrokerStartup杩涜鍚姩鐨勶紝浼氬疄渚嬪寲BrokerController锛屽苟涓旇皟鐢ㄥ叾鍒濆鍖栨柟娉�
澶у鍘荤湅Broker鐨勬簮鐮佺殑璇濅細鍙戠幇锛屼粬鐨�鍒濆鍖栨祦绋嬪緢鍐楅暱锛屼細鏍规嵁閰嶇疆鍒涘缓寰堝绾跨▼姹犱富瑕佺敤鏉�鍙戦�佹秷鎭�銆�鎷夊彇娑堟伅銆�鏌ヨ娑堟伅銆�瀹㈡埛绔鐞�鍜�娑堣垂鑰呯鐞�锛屼篃鏈夊緢澶�瀹氭椂浠诲姟锛屽悓鏃朵篃娉ㄥ唽浜嗗緢澶�璇锋眰澶勭悊鍣�锛岀敤鏉ュ彂閫佹媺鍙栨秷鎭煡璇㈡秷鎭殑銆�
Consumer
涓嶈浜嗙洿鎺ユ�煎浘鍚э紒瑕佹浜嗭紝涓嬫鎴戣繕鏄仛鎵洸锛屽啓鐐圭埥鏂囧惂555
Consumer鏄秷鎭帴鍙楋紝閭d粬鎬庝箞鎺ユ敹娑堟伅鐨勫憿锛�
娑堣垂绔細閫氳繃RebalanceService绾跨▼锛�10绉掗挓鍋氫竴娆″熀浜�Topic涓嬬殑鎵�鏈夐槦鍒楄礋杞姐��
闈㈣瘯甯歌闂鍒嗘瀽
浠栫殑浼樼己鐐规槸鍟�
RocketMQ浼樼偣锛�
鍗曟満鍚炲悙閲忥細鍗佷竾绾�
鍙敤鎬э細闈炲父楂橈紝鍒嗗竷寮忔灦鏋�
娑堟伅鍙潬鎬э細缁忚繃鍙傛暟浼樺寲閰嶇疆锛屾秷鎭彲浠ュ仛鍒�0涓㈠け
鍔熻兘鏀寔锛歁Q鍔熻兘杈冧负瀹屽杽锛岃繕鏄垎甯冨紡鐨勶紝鎵╁睍鎬уソ
鏀寔10浜跨骇鍒殑娑堟伅鍫嗙Н锛屼笉浼氬洜涓哄爢绉鑷存�ц兘涓嬮檷
婧愮爜鏄痡ava锛屾垜浠彲浠ヨ嚜宸遍槄璇绘簮鐮侊紝瀹氬埗鑷繁鍏徃鐨凪Q锛屽彲浠ユ帉鎺�
澶╃敓涓洪噾铻嶄簰鑱旂綉棰嗗煙鑰岀敓锛屽浜庡彲闈犳�ц姹傚緢楂樼殑鍦烘櫙锛屽挨鍏舵槸鐢靛晢閲岄潰鐨勮鍗曟墸娆撅紝浠ュ強涓氬姟鍓婂嘲锛屽湪澶ч噺浜ゆ槗娑屽叆鏃讹紝鍚庣鍙兘鏃犳硶鍙婃椂澶勭悊鐨勬儏鍐�
RoketMQ鍦ㄧǔ瀹氭�т笂鍙兘鏇村�煎緱淇¤禆锛岃繖浜涗笟鍔″満鏅湪闃块噷鍙�11宸茬粡缁忓巻浜嗗娆¤�冮獙锛屽鏋滀綘鐨勪笟鍔℃湁涓婅堪骞跺彂鍦烘櫙锛屽缓璁彲浠ラ�夋嫨RocketMQ
RocketMQ缂虹偣锛�
鏀寔鐨勫鎴风璇█涓嶅锛岀洰鍓嶆槸java鍙奵++锛屽叾涓璫++涓嶆垚鐔�
绀惧尯娲昏穬搴︿笉鏄壒鍒椿璺冮偅绉�
娌℃湁鍦� mq 鏍稿績涓幓瀹炵幇JMS绛夋帴鍙o紝鏈変簺绯荤粺瑕佽縼绉婚渶瑕佷慨鏀瑰ぇ閲忎唬鐮�
娑堟伅鍘婚噸
鍘婚噸鍘熷垯锛氫娇鐢ㄤ笟鍔$閫昏緫淇濇寔骞傜瓑鎬�
骞傜瓑鎬�锛氬氨鏄敤鎴峰浜庡悓涓�鎿嶄綔鍙戣捣鐨勪竴娆¤姹傛垨鑰呭娆¤姹傜殑缁撴灉鏄竴鑷寸殑锛屼笉浼氬洜涓哄娆$偣鍑昏�屼骇鐢熶簡鍓綔鐢紝鏁版嵁搴撶殑缁撴灉閮芥槸鍞竴鐨勶紝涓嶅彲鍙樼殑銆�
鍙淇濇寔骞傜瓑鎬э紝涓嶇鏉ュ灏戞潯閲嶅娑堟伅锛屾渶鍚庡鐞嗙殑缁撴灉閮戒竴鏍凤紝闇�瑕佷笟鍔$鏉ュ疄鐜般��
鍘婚噸绛栫暐锛氫繚璇佹瘡鏉℃秷鎭兘鏈夊敮涓�缂栧彿(姣斿鍞竴娴佹按鍙�)锛屼笖淇濊瘉娑堟伅澶勭悊鎴愬姛涓庡幓閲嶈〃鐨勬棩蹇楀悓鏃跺嚭鐜般��
寤虹珛涓�涓秷鎭〃锛屾嬁鍒拌繖涓秷鎭仛鏁版嵁搴撶殑insert鎿嶄綔銆傜粰杩欎釜娑堟伅鍋氫竴涓敮涓�涓婚敭锛坧rimary key锛夋垨鑰呭敮涓�绾︽潫锛岄偅涔堝氨绠楀嚭鐜伴噸澶嶆秷璐圭殑鎯呭喌锛屽氨浼氬鑷翠富閿啿绐侊紝閭d箞灏变笉鍐嶅鐞嗚繖鏉℃秷鎭��
娑堟伅閲嶅
娑堟伅棰嗗煙鏈変竴涓娑堟伅鎶曢�掔殑QoS瀹氫箟锛屽垎涓猴細
- 鏈�澶氫竴娆★紙At most once锛�
- 鑷冲皯涓�娆★紙At least once锛�
- 浠呬竴娆★紙 Exactly once锛�
QoS锛歈uality of Service锛屾湇鍔¤川閲�
鍑犱箮鎵�鏈夌殑MQ浜у搧閮藉0绉拌嚜宸卞仛鍒颁簡At least once銆�
鏃㈢劧鏄嚦灏戜竴娆★紝閭i伩鍏嶄笉浜嗘秷鎭噸澶嶏紝灏ゅ叾鏄湪鍒嗗竷寮忕綉缁滅幆澧冧笅銆�
姣斿锛氱綉缁滃師鍥犻棯鏂紝ACK杩斿洖澶辫触绛夌瓑鏁呴殰锛岀‘璁や俊鎭病鏈変紶閫佸埌娑堟伅闃熷垪锛屽鑷存秷鎭槦鍒椾笉鐭ラ亾鑷繁宸茬粡娑堣垂杩囪娑堟伅浜嗭紝鍐嶆灏嗚娑堟伅鍒嗗彂缁欏叾浠栫殑娑堣垂鑰呫��
涓嶅悓鐨勬秷鎭槦鍒楀彂閫佺殑纭淇℃伅褰㈠紡涓嶅悓锛屼緥濡�RabbitMQ鏄彂閫佷竴涓狝CK纭娑堟伅锛�RocketMQ鏄繑鍥炰竴涓狢ONSUME_SUCCESS鎴愬姛鏍囧織锛�Kafka瀹為檯涓婃湁涓猳ffset鐨勬蹇点��
RocketMQ娌℃湁鍐呯疆娑堟伅鍘婚噸鐨勮В鍐虫柟妗堬紝鏈�鏂扮増鏈槸鍚︽敮鎸佽繕闇�纭銆�
娑堟伅鐨勫彲鐢ㄦ��
褰撴垜浠�夋嫨濂戒簡闆嗙兢妯″紡涔嬪悗锛岄偅涔堟垜浠渶瑕佸叧蹇冪殑灏辨槸鎬庝箞鍘诲瓨鍌ㄥ拰澶嶅埗杩欎釜鏁版嵁锛�RocketMQ瀵规秷鎭殑鍒风洏鎻愪緵浜嗗悓姝ュ拰寮傛鐨勭瓥鐣ユ潵婊¤冻鎴戜滑鐨勶紝褰撴垜浠�夋嫨鍚屾鍒风洏涔嬪悗锛屽鏋滃埛鐩樿秴鏃朵細缁欒繑鍥濬LUSH_DISK_TIMEOUT锛屽鏋滄槸寮傛鍒风洏涓嶄細杩斿洖鍒风洏鐩稿叧淇℃伅锛岄�夋嫨鍚屾鍒风洏鍙互灏芥渶澶х▼搴︽弧瓒虫垜浠殑娑堟伅涓嶄細涓㈠け銆�
闄や簡瀛樺偍鏈夐�夋嫨涔嬪悗锛屾垜浠殑涓讳粠鍚屾鎻愪緵浜嗗悓姝ュ拰寮傛涓ょ妯″紡鏉ヨ繘琛屽鍒讹紝褰撶劧閫夋嫨鍚屾鍙互鎻愬崌鍙敤鎬э紝浣嗘槸娑堟伅鐨勫彂閫丷T鏃堕棿浼氫笅闄�10%宸﹀彸銆�
RocketMQ閲囩敤鐨勬槸娣峰悎鍨嬬殑瀛樺偍缁撴瀯锛屽嵆涓�Broker鍗曚釜瀹炰緥涓嬫墍鏈夌殑闃熷垪鍏辩敤涓�涓棩蹇楁暟鎹枃浠讹紙鍗充负CommitLog锛夋潵瀛樺偍銆�
鑰�Kafka閲囩敤鐨勬槸鐙珛鍨嬬殑瀛樺偍缁撴瀯锛屾瘡涓槦鍒椾竴涓枃浠躲��
杩欓噷甯呬笝璁や负锛�RocketMQ閲囩敤娣峰悎鍨嬪瓨鍌ㄧ粨鏋勭殑缂虹偣鍦ㄤ簬锛屼細瀛樺湪杈冨鐨勯殢鏈鸿鎿嶄綔锛屽洜姝よ鐨勬晥鐜囧亸浣庛�傚悓鏃舵秷璐规秷鎭渶瑕佷緷璧�ConsumeQueue锛屾瀯寤鸿閫昏緫娑堣垂闃熷垪闇�瑕佷竴瀹氬紑閿�銆�
RocketMQ 鍒风洏瀹炵幇
Broker 鍦ㄦ秷鎭殑瀛樺彇鏃剁洿鎺ユ搷浣滅殑鏄唴瀛橈紙鍐呭瓨鏄犲皠鏂囦欢锛夛紝杩欏彲浠ユ彁渚涚郴缁熺殑鍚炲悙閲忥紝浣嗘槸鏃犳硶閬垮厤鏈哄櫒鎺夌數鏃舵暟鎹涪澶憋紝鎵�浠ラ渶瑕佹寔涔呭寲鍒扮鐩樹腑銆�
鍒风洏鐨勬渶缁堝疄鐜伴兘鏄娇鐢�NIO涓殑 MappedByteBuffer.force() 灏嗘槧灏勫尯鐨勬暟鎹啓鍏ュ埌纾佺洏锛屽鏋滄槸鍚屾鍒风洏鐨勮瘽锛屽湪Broker鎶婃秷鎭啓鍒�CommitLog鏄犲皠鍖哄悗锛屽氨浼氱瓑寰呭啓鍏ュ畬鎴愩��
寮傛鑰岃█锛屽彧鏄敜閱掑搴旂殑绾跨▼锛屼笉淇濊瘉鎵ц鐨勬椂鏈猴紝娴佺▼濡傚浘鎵�绀恒��
椤哄簭娑堟伅锛�
鎴戠畝鍗曠殑璇翠竴涓嬫垜浠娇鐢ㄧ殑RocketMQ閲岄潰鐨勪竴涓畝鍗曞疄鐜板惂銆�
Tip锛氫负鍟ョ敤RocketMQ涓句緥鍛紝杩欑帺鎰忔槸闃块噷寮�婧愮殑锛屾垜闂簡涓嬭韩杈圭殑鏈嬪弸寰堝鍏徃閮芥湁浣跨敤锛屾墍浠ヨ鑰呭ぇ姒傜巼鏄繖涓殑璇濇垜灏辩敤杩欎釜涓句緥鍚э紝鍏蜂綋鐨勭粏鑺傛垜鍚庨潰浼氬湪RocketMQ鍜�Kafka鍚勮嚜绔犺妭璇村埌銆�
鐢熶骇鑰呮秷璐硅�呬竴鑸渶瑕佷繚璇侀『搴忔秷鎭殑璇濓紝鍙兘灏辨槸涓�涓笟鍔″満鏅笅鐨勶紝姣斿璁㈠崟鐨勫垱寤恒�佹敮浠樸�佸彂璐с�佹敹璐с��
閭h繖浜涗笢瑗挎槸涓嶆槸涓�涓鍗曞彿鍛紵涓�涓鍗曠殑鑲畾鏄竴涓鍗曞彿鐨勮锛岄偅绠�鍗曚簡鍛�銆�
涓�涓猼opic涓嬫湁澶氫釜闃熷垪锛屼负浜嗕繚璇佸彂閫佹湁搴忥紝RocketMQ鎻愪緵浜�MessageQueueSelector闃熷垪閫夋嫨鏈哄埗锛屼粬鏈変笁绉嶅疄鐜�:
鎴戜滑鍙娇鐢�Hash鍙栨ā娉�锛岃鍚屼竴涓鍗曞彂閫佸埌鍚屼竴涓槦鍒椾腑锛屽啀浣跨敤鍚屾鍙戦�侊紝鍙湁鍚屼釜璁㈠崟鐨勫垱寤烘秷鎭彂閫佹垚鍔燂紝鍐嶅彂閫佹敮浠樻秷鎭�傝繖鏍凤紝鎴戜滑淇濊瘉浜嗗彂閫佹湁搴忋��
RocketMQ鐨則opic鍐呯殑闃熷垪鏈哄埗,鍙互淇濊瘉瀛樺偍婊¤冻FIFO锛團irst Input First Output 绠�鍗曡灏辨槸鎸囧厛杩涘厛鍑猴級,鍓╀笅鐨勫彧闇�瑕佹秷璐硅�呴『搴忔秷璐瑰嵆鍙��
RocketMQ浠呬繚璇侀『搴忓彂閫侊紝椤哄簭娑堣垂鐢辨秷璐硅�呬笟鍔′繚璇�!!!
杩欓噷寰堝ソ鐞嗚В锛屼竴涓鍗曚綘鍙戦�佺殑鏃跺�欐斁鍒颁竴涓槦鍒楅噷闈㈠幓锛屼綘鍚屼竴涓殑璁㈠崟鍙稨ash涓�涓嬫槸涓嶆槸杩樻槸涓�鏍风殑缁撴灉锛岄偅鑲畾鏄竴涓秷璐硅�呮秷璐癸紝閭i『搴忔槸涓嶆槸灏变繚璇佷簡锛�
鐪熸鐨勯『搴忔秷璐逛笉鍚岀殑涓棿浠堕兘鏈夎嚜宸辩殑涓嶅悓瀹炵幇鎴戣繖閲屽氨涓句釜渚嬪瓙锛屽ぇ瀹舵�濊矾鐞嗚В涓嬨��
鍒嗗竷寮忎簨鍔★細
Half Message(鍗婃秷鎭�)
鏄寚鏆備笉鑳借Consumer娑堣垂鐨勬秷鎭�銆侾roducer 宸茬粡鎶婃秷鎭垚鍔熷彂閫佸埌浜� Broker 绔紝浣嗘娑堟伅琚爣璁颁负鏆備笉鑳芥姇閫�
鐘舵�侊紝澶勪簬璇ョ鐘舵�佷笅鐨勬秷鎭О涓哄崐娑堟伅銆傞渶瑕� Producer
瀵规秷鎭殑浜屾纭
鍚庯紝Consumer鎵嶈兘鍘绘秷璐瑰畠銆�
娑堟伅鍥炴煡
鐢变簬缃戠粶闂锛岀敓浜ц�呭簲鐢ㄩ噸鍚瓑鍘熷洜銆傚鑷� Producer 绔竴鐩存病鏈夊 Half Message(鍗婃秷鎭�) 杩涜 浜屾纭銆傝繖鏄�Brock鏈嶅姟鍣ㄤ細瀹氭椂鎵弿闀挎湡澶勪簬鍗婃秷鎭殑娑堟伅
锛屼細
涓诲姩璇㈤棶 Producer绔� 璇ユ秷鎭殑鏈�缁堢姸鎬�(Commit鎴栬�匯ollback),璇ユ秷鎭嵆涓� 娑堟伅鍥炴煡銆�
- A鏈嶅姟鍏堝彂閫佷釜Half Message缁橞rock绔紝娑堟伅涓惡甯� B鏈嶅姟 鍗冲皢瑕�+100鍏冪殑淇℃伅銆�
- 褰揂鏈嶅姟鐭ラ亾Half Message鍙戦�佹垚鍔熷悗锛岄偅涔堝紑濮嬬3姝ユ墽琛屾湰鍦颁簨鍔°��
- 鎵ц鏈湴浜嬪姟(浼氭湁涓夌鎯呭喌1銆佹墽琛屾垚鍔熴��2銆佹墽琛屽け璐ャ��3銆佺綉缁滅瓑鍘熷洜瀵艰嚧娌℃湁鍝嶅簲)
- 濡傛灉鏈湴浜嬪姟鎴愬姛锛岄偅涔圥roduct鍍廈rock鏈嶅姟鍣ㄥ彂閫丆ommit,杩欐牱B鏈嶅姟灏卞彲浠ユ秷璐硅message銆�
- 濡傛灉鏈湴浜嬪姟澶辫触锛岄偅涔圥roduct鍍廈rock鏈嶅姟鍣ㄥ彂閫丷ollback,閭d箞灏变細鐩存帴鍒犻櫎涓婇潰杩欐潯鍗婃秷鎭��
- 濡傛灉鍥犱负缃戠粶绛夊師鍥犺繜杩熸病鏈夎繑鍥炲け璐ヨ繕鏄垚鍔燂紝閭d箞浼氭墽琛孯ocketMQ鐨勫洖璋冩帴鍙�,鏉ヨ繘琛屼簨鍔$殑鍥炴煡銆�
娑堟伅杩囨护
- Broker绔秷鎭繃婊ゃ��銆�
鍦�Broker涓紝鎸夌収Consumer鐨勮姹傚仛杩囨护锛屼紭鐐规槸鍑忓皯浜嗗浜�Consumer鏃犵敤娑堟伅鐨勭綉缁滀紶杈撱�傜己鐐规槸澧炲姞浜咮roker鐨勮礋鎷咃紝瀹炵幇鐩稿澶嶆潅銆� - Consumer绔秷鎭繃婊�
杩欑杩囨护鏂瑰紡鍙敱搴旂敤瀹屽叏鑷畾涔夊疄鐜帮紝浣嗘槸缂虹偣鏄緢澶氭棤鐢ㄧ殑娑堟伅瑕佷紶杈撳埌Consumer绔��
Broker鐨凚uffer闂
Broker鐨�Buffer閫氬父鎸囩殑鏄疊roker涓竴涓槦鍒楃殑鍐呭瓨Buffer澶у皬锛岃繖绫�Buffer閫氬父澶у皬鏈夐檺銆�
鍙﹀锛孯ocketMQ娌℃湁鍐呭瓨Buffer姒傚康锛孯ocketMQ鐨勯槦鍒楅兘鏄寔涔呭寲纾佺洏锛屾暟鎹畾鏈熸竻闄ゃ��
RocketMQ鍚屽叾浠朚Q鏈夐潪甯告樉钁楃殑鍖哄埆锛孯ocketMQ鐨勫唴瀛�Buffer鎶借薄鎴愪竴涓棤闄愰暱搴︾殑闃熷垪锛屼笉绠℃湁澶氬皯鏁版嵁杩涙潵閮借兘瑁呭緱涓嬶紝杩欎釜鏃犻檺鏄湁鍓嶆彁鐨勶紝Broker浼氬畾鏈熷垹闄よ繃鏈熺殑鏁版嵁銆�
渚嬪Broker鍙繚瀛�3澶╃殑娑堟伅锛岄偅涔堣繖涓�Buffer铏界劧闀垮害鏃犻檺锛屼絾鏄�3澶╁墠鐨勬暟鎹細琚粠闃熷熬鍒犻櫎銆�
鍥炴函娑堣垂
鍥炴函娑堣垂鏄寚Consumer宸茬粡娑堣垂鎴愬姛鐨勬秷鎭紝鐢变簬涓氬姟涓婄殑闇�姹傞渶瑕侀噸鏂版秷璐癸紝瑕佹敮鎸佹鍔熻兘锛孊roker鍦ㄥ悜Consumer鎶曢�掓垚鍔熸秷鎭悗锛屾秷鎭粛鐒堕渶瑕佷繚鐣欍�傚苟涓旈噸鏂版秷璐逛竴鑸槸鎸夌収鏃堕棿缁村害銆�
渚嬪鐢变簬Consumer绯荤粺鏁呴殰锛屾仮澶嶅悗闇�瑕侀噸鏂版秷璐�1灏忔椂鍓嶇殑鏁版嵁锛岄偅涔圔roker瑕佹彁渚涗竴绉嶆満鍒讹紝鍙互鎸夌収鏃堕棿缁村害鏉ュ洖閫�娑堣垂杩涘害銆�
RocketMQ鏀寔鎸夌収鏃堕棿鍥炴函娑堣垂锛屾椂闂寸淮搴︾簿纭埌姣锛屽彲浠ュ悜鍓嶅洖婧紝涔熷彲浠ュ悜鍚庡洖婧��
娑堟伅鍫嗙Н
娑堟伅涓棿浠剁殑涓昏鍔熻兘鏄紓姝ヨВ鑰︼紝杩樻湁涓噸瑕佸姛鑳芥槸鎸′綇鍓嶇鐨勬暟鎹椽宄帮紝淇濊瘉鍚庣绯荤粺鐨勭ǔ瀹氭�э紝杩欏氨瑕佹眰娑堟伅涓棿浠跺叿鏈変竴瀹氱殑娑堟伅鍫嗙Н鑳藉姏锛屾秷鎭爢绉垎浠ヤ笅涓ょ鎯呭喌锛�
- 娑堟伅鍫嗙Н鍦ㄥ唴瀛�Buffer锛屼竴鏃﹁秴杩囧唴瀛�Buffer锛屽彲浠ユ牴鎹竴瀹氱殑涓㈠純绛栫暐鏉ヤ涪寮冩秷鎭紝濡侰ORBA Notification瑙勮寖涓弿杩般�傞�傚悎鑳藉蹇嶄涪寮冩秷鎭殑涓氬姟锛岃繖绉嶆儏鍐垫秷鎭殑鍫嗙Н鑳藉姏涓昏鍦ㄤ簬鍐呭瓨Buffer澶у皬锛岃�屼笖娑堟伅鍫嗙Н鍚庯紝鎬ц兘涓嬮檷涓嶄細澶ぇ锛屽洜涓哄唴瀛樹腑鏁版嵁澶氬皯瀵逛簬瀵瑰鎻愪緵鐨勮闂兘鍔涘奖鍝嶆湁闄愩��
- 娑堟伅鍫嗙Н鍒版寔涔呭寲瀛樺偍绯荤粺涓紝渚嬪DB锛孠V瀛樺偍锛屾枃浠惰褰曞舰寮忋�� 褰撴秷鎭笉鑳藉湪鍐呭瓨Cache鍛戒腑鏃讹紝瑕佷笉鍙伩鍏嶇殑璁块棶纾佺洏锛屼細浜х敓澶ч噺璇籌O锛岃IO鐨勫悶鍚愰噺鐩存帴鍐冲畾浜嗘秷鎭爢绉悗鐨勮闂兘鍔涖��
- 璇勪及娑堟伅鍫嗙Н鑳藉姏涓昏鏈変互涓嬪洓鐐癸細
- 娑堟伅鑳藉爢绉灏戞潯锛屽灏戝瓧鑺傦紵鍗虫秷鎭殑鍫嗙Н瀹归噺銆�
- 娑堟伅鍫嗙Н鍚庯紝鍙戞秷鎭殑鍚炲悙閲忓ぇ灏忥紝鏄惁浼氬彈鍫嗙Н褰卞搷锛�
- 娑堟伅鍫嗙Н鍚庯紝姝e父娑堣垂鐨凜onsumer鏄惁浼氬彈褰卞搷锛�
- 娑堟伅鍫嗙Н鍚庯紝璁块棶鍫嗙Н鍦ㄧ鐩樼殑娑堟伅鏃讹紝鍚炲悙閲忔湁澶氬ぇ锛�
瀹氭椂娑堟伅
瀹氭椂娑堟伅鏄寚娑堟伅鍙戝埌Broker鍚庯紝涓嶈兘绔嬪埢琚�Consumer娑堣垂锛岃鍒扮壒瀹氱殑鏃堕棿鐐规垨鑰呯瓑寰呯壒瀹氱殑鏃堕棿鍚庢墠鑳借娑堣垂銆�
濡傛灉瑕佹敮鎸佷换鎰忕殑鏃堕棿绮惧害锛屽湪Broker灞傞潰锛屽繀椤昏鍋氭秷鎭帓搴忥紝濡傛灉鍐嶆秹鍙婂埌鎸佷箙鍖栵紝閭d箞娑堟伅鎺掑簭瑕佷笉鍙伩鍏嶇殑浜х敓宸ㄥぇ鎬ц兘寮�閿�銆�
RocketMQ鏀寔瀹氭椂娑堟伅锛屼絾鏄笉鏀寔浠绘剰鏃堕棿绮惧害锛屾敮鎸佺壒瀹氱殑level锛屼緥濡傚畾鏃�5s锛�10s锛�1m绛夈��
鎬荤粨
鍐欒繖绉嶅崟绾粙缁嶄腑闂翠欢鐨勬灟鐕ヤ箯鍛筹紝澶у鐪嬭捣鏉ヤ及璁′篃绱紝鐩墠宸茬粡鐮翠竴涓囦釜瀛椾簡锛屼互鍚庢垜杩欑绫诲瀷鐨勫皯鍐欙紝澶у鑰佹槸璁╂垜鍐欑偣娣卞害鐨勶紝鎴戣鐪熺殑寰堝涓滆タ鎴戞簮鐮佷竴璐达紝鐪嬮兘娌′汉鐪嬨��
Kafka鎴戝氨涓嶅彂鍗氬浜嗭紝澶у鍙互鍘�GItHub涓婄涓�鏃堕棿闃呰锛屽悗闈細鍑烘�庝箞鎼缓椤圭洰鍦ㄦ湇鍔″櫒鐨勬暀绋嬶紝杩樻湁涓�浜涘ぇ鐗涗釜浜虹粡鍘嗗拰涓汉涔﹀崟鐨勪笢瑗匡紝浠婂勾搴旇鍏堣繖涔堝啓锛屼富瑕佹槸鐪熷績澶繖浜嗭紝鏈涚悊瑙c��
绲彣
鎴戜篃涓嶈繃澶氭弿杩颁簡锛屽弽姝e槢缃戠粶涓婇噸鎷冲嚭鍑诲槢锛岀幇瀹炰腑鍞敮璇鸿锛岃浠栬鐞嗙敱涔熻涓嶅嚭鏉ワ紝涓嶅洖鎴戙��
浠栬鐨勬槸涓嬮潰杩欎釜鍦烘櫙澶氱嚎绋嬬殑鎯呭喌锛屽氨鏄涓�涓嚎绋嬭繕娌¤蛋瀹岋紝绗簩涓幇鍦ㄨ繘鏉ワ紝涔熷垽鏂病澶勭悊杩囬偅涓嶅氨涓や釜閮界户缁姞浜嗕箞锛�
璁㈠崟鍙�+涓氬姟鍦烘櫙锛岀粍鎴愪竴涓敮涓�涓婚敭锛屼綘鎻掑叆鏁版嵁搴撳彧鑳芥垚鍔熺涓�涓紝鍚庣画鐨勯兘浼氭姤閿欑殑锛屾姤杩濆弽鍞竴涓婚敭鐨勯敊璇��
杩樻湁灏辨槸鏈変汉鐤戞儜涓哄暐涓嶇洿鎺ュ氨涓嶅垽鏂氨绛変粬鎻掑叆鐨勬椂鍊欐姤閿欙紝涓㈡帀鍚庣画鐨勫氨濂戒簡锛�
浣犺鐭ラ亾鎶ラ敊鏈夊緢澶氱锛屼綘鍝噷鐭ラ亾涓嶆槸鏁版嵁搴撴寕浜嗙殑閿欙紵鎴栬�呭埆鐨勮繍琛屾椂寮傚父锛�
涓嶈繃浣犲鏋滃彲浠ュ仛鍒版姏鐗瑰畾鐨勫紓甯镐篃鍙互锛屽弽姝f垜浠鍑忓皯鏁版嵁搴撶殑鎶ラ敊锛屽鏋滃苟鍙戝ぇ锛屽儚鎴戠幇鍦ㄨ礋璐g殑绯荤粺閮芥槸10W+QPS锛岄偅鏃ュ織浼氭墦婊$柉鐙傛姤璀︾殑銆傦紙灏辨槸姝e父鎯呭喌鎴戜滑閮界粡甯告姤璀︼級
瑙e喅闂鐨勬�濊矾鏈夊緢澶氾紝鍠锋垜鍙互锛岃娓呮闂锛岃娓呮浣犵殑鐞嗙敱銆�
寰堝澶у閮藉彧鏄崟鏂归潰鐨勭煡璇嗘憚鍏ワ紝灏辫繖鏍疯繕瑕佸柗鎴戯紝杩樻湁涓�涓婃潵灏遍棶鎴戜负鍟ヤ粖澶╂病鍙戞枃绔狅紝鎴戞瑺浣犵殑锛熸垜宸ヤ綔鏃ヤ笂鐝紝鍛ㄥ叚鍛ㄦ棩閮芥�间笂鍘讳簡锛屾椂闂存湁闄愬晩锛屽摜鍝ャ��
澶у閮芥湁鑷繁鐨勪簨鎯咃紝鍐欐枃绔犱篃鑰楁椂鑰楄剳锛岄毦鍏嶅嚭閿欙紝杩樻湜鐞嗚В銆�
鏃ュ父姹傝禐
濂戒簡鍚勪綅锛屼互涓婂氨鏄繖绡囨枃绔犵殑鍏ㄩ儴鍐呭浜嗭紝鑳界湅鍒拌繖閲岀殑浜哄憖锛岄兘鏄�浜烘墠銆�
鎴戝悗闈細姣忓懆閮芥洿鏂板嚑绡囥�婂悐鎵撻潰璇曞畼銆嬬郴鍒楀拰浜掕仈缃戝父鐢ㄦ妧鏈爤鐩稿叧鐨勬枃绔狅紝闈炲父鎰熻阿浜烘墠浠兘鐪嬪埌杩欓噷锛屽鏋滆繖涓枃绔犲啓寰楄繕涓嶉敊锛岃寰椼�屾晼涓欍�嶆垜鏈夌偣涓滆タ鐨勮瘽 姹傜偣璧烉煈� 姹傚叧娉ㄢ潳锔� 姹傚垎浜煈� 瀵规殩鐢锋垜鏉ヨ鐪熺殑 闈炲父鏈夌敤锛侊紒锛�
鍒涗綔涓嶆槗锛屽悇浣嶇殑鏀寔鍜岃鍙紝灏辨槸鎴戝垱浣滅殑鏈�澶у姩鍔涳紝鎴戜滑涓嬬瘒鏂囩珷瑙侊紒
鏁栦笝 | 鏂� 銆愬師鍒涖�戙�愯浆杞借鑱旂郴鏈汉銆� 濡傛灉鏈瘒鍗氬鏈変换浣曢敊璇紝璇锋壒璇勬寚鏁欙紝涓嶈儨鎰熸縺 锛�
銆婂悐鎵撻潰璇曞畼銆嬬郴鍒楁瘡鍛ㄦ寔缁洿鏂帮紝鍙互鍏虫敞鎴戠殑鍏紬鍙枫�� JavaFamily 銆嶇涓�鏃堕棿闃呰鍜屽偓鏇达紙鍏紬鍙锋瘮鍗氬鏃╀竴鍒颁袱绡囧摕锛夛紝鏈枃GitHubhttps://github.com/JavaFamily 宸叉敹褰曪紝鏈変竴绾垮ぇ鍘傞潰璇曠偣鎬濈淮瀵煎浘锛屾杩嶴tar鍜屽畬鍠勶紝閲岄潰涔熸湁鎴戜釜浜鸿仈绯绘柟寮忔湁浠�涔堥棶棰樹篃鍙互鐩存帴鎵炬垜锛屼篃鏈夋妧鏈氦娴佺兢锛屾垜浠竴璧锋湁鐐逛笢瑗裤��