鍐掔潃鏈熸湯鎸傜鐨勯闄╀篃瑕佺粰浣犵湅鐨勬秷鎭槦鍒楀拰RocketMQ鍏ラ棬鎬荤粨
Posted JavaGuide
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了鍐掔潃鏈熸湯鎸傜鐨勯闄╀篃瑕佺粰浣犵湅鐨勬秷鎭槦鍒楀拰RocketMQ鍏ラ棬鎬荤粨相关的知识,希望对你有一定的参考价值。
鏈枃鐢?FrancisQ 鑰佸摜鎶曠锛?/p>
鏂囩珷寰堥暱锛岀偣璧炲啀鐪嬶紝鍏绘垚濂戒範鎯煒嬸煒嬸煒?/span>
娑堟伅闃熷垪鎵洸
娑堟伅闃熷垪椤惧悕鎬濅箟灏辨槸瀛樻斁娑堟伅鐨勯槦鍒楋紝闃熷垪鎴戝氨涓嶈В閲婁簡锛屽埆鍛婅瘔鎴戜綘杩為槦鍒楅兘涓嶇煡閬撲技鍟ュ惂锛?/p>
鎵€浠ラ棶棰樺苟涓嶆槸娑堟伅闃熷垪鏄粈涔堬紝鑰屾槸 娑堟伅闃熷垪涓轰粈涔堜細鍑虹幇锛熸秷鎭槦鍒楄兘鐢ㄦ潵骞蹭粈涔堬紵鐢ㄥ畠鏉ュ共杩欎簺浜嬩細甯︽潵浠€涔堝ソ澶勶紵娑堟伅闃熷垪浼氬甫鏉ュ壇浣滅敤鍚楋紵
娑堟伅闃熷垪涓轰粈涔堜細鍑虹幇锛?/span>
娑堟伅闃熷垪绠楁槸浣滀负鍚庣绋嬪簭鍛樼殑涓€涓繀澶囨妧鑳藉惂锛屽洜涓?span class="mq-14">鍒嗗竷寮忓簲鐢ㄥ繀瀹氭秹鍙婂埌鍚勪釜绯荤粺涔嬮棿鐨勯€氫俊闂锛岃繖涓椂鍊欐秷鎭槦鍒椾篃搴旇繍鑰岀敓浜嗐€傚彲浠ヨ鍒嗗竷寮忕殑浜х敓鏄秷鎭槦鍒楃殑鍩虹锛岃€屽垎甯冨紡鎬曟槸涓€涓緢鍙よ€佺殑姒傚康浜嗗惂锛屾墍浠ユ秷鎭槦鍒椾篃鏄竴涓緢鍙よ€佺殑涓棿浠朵簡銆?/p>
娑堟伅闃熷垪鑳界敤鏉ュ共浠€涔堬紵
寮傛
浣犲彲鑳戒細鍙嶉┏鎴戯紝搴旂敤涔嬮棿鐨勯€氫俊鍙堜笉鏄彧鑳界敱娑堟伅闃熷垪瑙e喅锛屽ソ濂界殑閫氫俊涓轰粈涔堜腑闂撮潪瑕佹彃涓€涓秷鎭槦鍒楀憿锛熸垜涓嶈兘鐩存帴杩涜閫氫俊鍚楋紵
寰堝ソ馃憤锛屼綘鍙堟彁鍑轰簡涓€涓蹇碉紝鍚屾閫氫俊銆傚氨姣斿鐜板湪涓氱晫浣跨敤姣旇緝澶氱殑 鎴戞潵涓句釜馃尠鍚э紝姣斿鎴戜滑鏈変竴涓喘绁ㄧ郴缁燂紝闇€姹傛槸鐢ㄦ埛鍦ㄨ喘涔板畬涔嬪悗鑳芥帴鏀跺埌璐拱瀹屾垚鐨勭煭淇°€?/p>
鎴戜滑鐪佺暐涓棿鐨勭綉缁滈€氫俊鏃堕棿娑堣€楋紝鍋囧璐エ绯荤粺澶勭悊闇€瑕?150ms 锛岀煭淇$郴缁熷鐞嗛渶瑕?200ms 锛岄偅涔堟暣涓鐞嗘祦绋嬬殑鏃堕棿娑堣€楀氨鏄?150ms + 200ms = 350ms銆?/p>
褰撶劧锛屼箥鐪嬫病浠€涔堥棶棰樸€傚彲鏄粩缁嗕竴鎯充綘灏辨劅瑙夋湁鐐归棶棰橈紝鎴戠敤鎴疯喘绁ㄥ湪璐エ绯荤粺鐨勬椂鍊欏叾瀹炲氨宸茬粡瀹屾垚浜嗚喘涔帮紝鑰屾垜鐜板湪閫氳繃鍚屾璋冪敤闈炶璁╂暣涓姹傛媺闀挎椂闂达紝鑰岀煭鎭郴缁熻繖鐜╂剰鍙堜笉鏄緢鏈夊繀瑕侊紝瀹冧粎浠呮槸涓€涓緟鍔╁姛鑳藉寮虹敤鎴蜂綋楠屾劅鑰屽凡銆傛垜鐜板湪鏁翠釜璋冪敤娴佺▼灏辨湁鐐?nbsp;澶撮噸鑴氳交 鐨勬劅瑙変簡锛岃喘绁ㄦ槸涓€涓笉澶€楁椂鐨勬祦绋嬶紝鑰屾垜鐜板湪鍥犱负鍚屾璋冪敤锛岄潪瑕佺瓑寰呭彂閫佺煭淇¤繖涓瘮杈冭€楁椂鐨勬搷浣滄墠杩斿洖缁撴灉銆傞偅鎴戝鏋滃啀鍔犱竴涓彂閫侀偖浠跺憿锛?/p>
杩欐牱鏁翠釜绯荤粺鐨勮皟鐢ㄩ摼鍙堝彉闀夸簡锛屾暣涓椂闂村氨鍙樻垚浜?50ms銆?/p>
褰撴垜浠湪瀛︾敓鏃朵唬闇€瑕佸湪椋熷爞鎺掗槦鐨勬椂鍊欙紝鎴戜滑鍜岄鍫傚ぇ濡堝氨鏄竴涓悓姝ョ殑妯″瀷銆?/p>
鎴戜滑闇€瑕佸憡璇夐鍫傚ぇ濡堬細鈥滃濮愶紝缁欐垜鍔犱釜楦¤吙锛屽啀鍔犱釜閰歌荆鍦熻眴涓濓紝甯垜娴囩偣姹佷笂鍘伙紝澶氭墦鐐归キ鍝︷煒嬸煒嬸煒嬧€?鍜~~ 涓轰簡澶氬悆鐐癸紝鐪熸伓蹇冦€?/p>
鐒跺悗澶у甯垜浠墦楗厤鑿滐紝鎴戜滑鐪嬬潃澶у閭iⅳ鎶栫殑鎵嬪拰鎺夎惤鐨勫湡璞嗕笣涓嶇鍜戒簡鍜藉彛姘淬€?/p>
鏈€缁堟垜浠粠澶у鎵嬩腑鎺ヨ繃楗彍鐒跺悗鍘诲鎵惧骇浣嶄簡鈥?/p>
鍥炴兂涓€涓嬶紝鎴戜滑鍦ㄧ粰澶у鍙戦€侀渶瑕佺殑淇℃伅涔嬪悗鎴戜滑鏄?nbsp;鍚屾绛夊緟澶у缁欐垜閰嶅ソ楗彍 鐨勶紝涓婇潰鎴戜滑鍙槸鍔犱簡楦¤吙鍜屽湡璞嗕笣锛屼竾涓€鎴戝啀鍔犱竴涓暘鑼勭墰鑵╋紝闊彍楦¤泲锛岃繖鏍锋槸涓嶆槸澶у鎵撻キ閰嶈彍鐨勬祦绋嬪氨浼氬彉闀匡紝鎴戜滑绛夊緟鐨勬椂闂翠篃浼氱浉搴旂殑鍙橀暱銆?/p>
閭e悗鏉ワ紝鎴戜滑宸ヤ綔璧氶挶浜嗘湁閽卞幓楗簵鍚冮キ浜嗭紝鎴戜滑鍛婅瘔鏈嶅姟鍛樻潵涓€纰楃墰鑲夐潰鍔犱釜鑽峰寘铔?nbsp;(浼犺揪涓€涓秷鎭? 锛岀劧鍚庢垜浠氨鍙互鍦ㄩキ妗屼笂瀹夊績鐨勭帺鎵嬫満浜?nbsp;(骞茶嚜宸卞叾浠栦簨鎯? 锛岀瓑鍒版垜浠殑鐗涜倝闈笂浜嗘垜浠氨鍙互鍚冧簡銆傝繖鍏朵腑鎴戜滑涔熷氨浼犺揪浜嗕竴涓秷鎭紝鐒跺悗鎴戜滑鍙堣浆杩囧ご骞插叾浠栦簨鎯呬簡銆傝繖鍏朵腑铏界劧鍋氶潰鐨勬椂闂存病鏈夊彉鐭紝浣嗘槸鎴戜滑鍙渶瑕佷紶杈句竴涓秷鎭氨鍙互鐪嬪叾浠栦簨鎯呬簡锛岃繖鏄竴涓?nbsp;寮傛 鐨勬蹇点€?/p>
鎵€浠ワ紝涓轰簡瑙e喅杩欎竴涓棶棰橈紝鑱槑鐨勭▼搴忓憳鍦ㄤ腑闂翠篃鍔犱簡涓被浼间簬鏈嶅姟鍛樼殑涓棿浠垛€斺€旀秷鎭槦鍒椼€傝繖涓椂鍊欐垜浠氨鍙互鎶婃ā鍨嬬粰鏀归€犱簡銆?/p>
杩欐牱锛屾垜浠湪灏嗘秷鎭瓨鍏ユ秷鎭槦鍒椾箣鍚庢垜浠氨鍙互鐩存帴杩斿洖浜?鎴戜滑鍛婅瘔鏈嶅姟鍛樻垜浠鍚冧粈涔堢劧鍚庣帺鎵嬫満)锛屾墍浠ユ暣涓€楁椂鍙槸 150ms + 10ms = 160ms銆?/p>
浣嗘槸浣犻渶瑕佹敞鎰忕殑鏄紝鏁翠釜娴佺▼鐨勬椂闀挎槸娌″彉鐨勶紝灏卞儚浣犱粎浠呭憡璇夋湇鍔″憳瑕佸悆浠€涔堟槸涓嶄細褰卞搷鍒板仛闈㈢殑閫熷害鐨勩€?/p>
鍥炲埌鏈€鍒濆悓姝ヨ皟鐢ㄧ殑杩囩▼锛屾垜浠啓涓吉浠g爜绠€鍗曟鎷竴涓嬨€?/p>
閭d箞绗簩姝ワ紝鎴戜滑鍙堟坊鍔犱簡涓€涓彂閫侀偖浠讹紝鎴戜滑灏卞緱閲嶆柊鍘讳慨鏀逛唬鐮侊紝濡傛灉鎴戜滑鍙堝姞涓€涓渶姹傦細鐢ㄦ埛璐拱瀹岃繕闇€瑕佺粰浠栧姞绉垎锛岃繖涓椂鍊欐垜浠槸涓嶆槸鍙堝緱鏀逛唬鐮侊紵 濡傛灉浣犺寰楄繕琛岋紝閭d箞鎴戣繖涓椂鍊欎笉瑕佸彂閭欢杩欎釜鏈嶅姟浜嗗憿锛屾垜鏄笉鏄張寰楁敼浠g爜锛屽張寰楅噸鍚簲鐢紵 杩欐牱鏀规潵鏀瑰幓鏄笉鏄緢楹荤儲锛岄偅涔?nbsp;姝ゆ椂鎴戜滑灏辩敤涓€涓秷鎭槦鍒楀湪涓棿杩涜瑙h€?/strong> 銆備綘闇€瑕佹敞鎰忕殑鏄紝鎴戜滑鍚庨潰鐨勫彂閫佺煭淇°€佸彂閫侀偖浠躲€佹坊鍔犵Н鍒嗙瓑涓€浜涙搷浣滈兘渚濊禆浜庝笂闈㈢殑 鎴戜笂闈㈡墍璁茬殑鈥滃箍鎾€濆苟涓嶆槸鐪熸鐨勫箍鎾紝鑰屾槸鎺ヤ笅鏉ョ殑绯荤粺浣滀负娑堣垂鑰呭幓 璁㈤槄 鐗瑰畾鐨勪富棰樸€傛瘮濡傛垜浠繖閲岀殑涓婚灏卞彲浠ュ彨鍋?nbsp; 濡傛灉娌℃湁娑堟伅闃熷垪锛屾瘡褰撲竴涓柊鐨勪笟鍔℃帴鍏ワ紝鎴戜滑閮借鍦ㄤ富绯荤粺璋冪敤鏂版帴鍙c€佹垨鑰呭綋鎴戜滑鍙栨秷鏌愪簺涓氬姟锛屾垜浠篃寰楀湪涓荤郴缁熷垹闄ゆ煇浜涙帴鍙h皟鐢ㄣ€傛湁浜嗘秷鎭槦鍒楋紝鎴戜滑鍙渶瑕佸叧蹇冩秷鎭槸鍚﹂€佽揪浜嗛槦鍒楋紝鑷充簬璋佸笇鏈涜闃咃紝鎺ヤ笅鏉ユ敹鍒版秷鎭浣曞鐞嗭紝鏄笅娓哥殑浜嬫儏锛屾棤鐤戞瀬澶у湴鍑忓皯浜嗗紑鍙戝拰鑱旇皟鐨勫伐浣滈噺銆?/p>
鎴戜滑鍐嶆鍥炲埌涓€寮€濮嬫垜浠娇鐢ㄥ悓姝ヨ皟鐢ㄧ郴缁熺殑鎯呭喌锛屽苟涓旀€濊€冧竴涓嬶紝濡傛灉姝ゆ椂鏈夊ぇ閲忕敤鎴疯姹傝喘绁ㄦ暣涓郴缁熶細鍙樻垚浠€涔堟牱锛?/p>
濡傛灉锛屾鏃舵湁涓€涓囩殑璇锋眰杩涘叆璐エ绯荤粺锛屾垜浠煡閬撹繍琛屾垜浠富涓氬姟鐨勬湇鍔″櫒閰嶇疆涓€鑸細姣旇緝濂斤紝鎵€浠ヨ繖閲屾垜浠亣璁捐喘绁ㄧ郴缁熻兘鎵垮彈杩欎竴涓囩殑鐢ㄦ埛璇锋眰锛岄偅涔堜篃灏辨剰鍛崇潃鎴戜滑鍚屾椂涔熶細鍑虹幇涓€涓囪皟鐢ㄥ彂鐭俊鏈嶅姟鐨勮姹傘€傝€屽浜庣煭淇$郴缁熸潵璇村苟涓嶆槸鎴戜滑鐨勪富瑕佷笟鍔★紝鎵€浠ユ垜浠厤澶囩殑纭欢璧勬簮骞朵笉浼氬お楂橈紝閭d箞浣犺寰楃幇鍦ㄨ繖涓煭淇$郴缁熻兘鎵垮彈杩欎竴涓囩殑宄板€间箞锛屼笖涓嶈鑳戒笉鑳芥壙鍙楋紝绯荤粺浼氫笉浼?nbsp;鐩存帴宕╂簝 浜嗭紵 鐭俊涓氬姟鍙堜笉鏄垜浠殑涓讳笟鍔★紝鎴戜滑鑳戒笉鑳?nbsp;鎶樹腑澶勭悊 鍛紵濡傛灉鎴戜滑鎶婅喘涔板畬鎴愮殑淇℃伅鍙戦€佸埌娑堟伅闃熷垪涓紝鑰岀煭淇$郴缁?nbsp;灏借嚜宸辨墍鑳藉湴鍘绘秷鎭槦鍒椾腑鍙栨秷鎭拰娑堣垂娑堟伅 锛屽嵆浣垮鐞嗛€熷害鎱竴鐐逛篃鏃犳墍璋擄紝鍙鎴戜滑鐨勭郴缁熸病鏈夊穿婧冨氨琛屼簡銆?/p>
鐣欏緱姹熷北鍦紝杩樻€曟病鏌寸儳锛熶綘鏁㈣姣忔鍙戦€侀獙璇佺爜鐨勬椂鍊欐槸涓€鍙戜綘灏辨敹鍒颁簡鐨勪箞锛?/p>
鍏跺疄涓婇潰鎴戝凡缁忚浜嗐€?span class="mq-88">寮傛銆佽В鑰︺€佸墛宄般€?/strong> 鍝€曚綘涓婇潰鐨勯兘娌$湅鎳備篃鍗冧竾瑕佽浣忚繖鍏釜瀛楋紝鍥犱负浠栦笉浠呮槸娑堟伅闃熷垪鐨勭簿鍗庯紝鏇存槸缂栫▼鍜屾灦鏋勭殑绮惧崕銆?/p>
娌℃湁鍝竴闂ㄦ妧鏈槸鈥滈摱寮光€濓紝娑堟伅闃熷垪涔熸湁瀹冪殑鍓綔鐢ㄣ€?/p>
姣斿锛屾湰鏉ュソ濂界殑涓や釜绯荤粺涔嬮棿鐨勮皟鐢紝鎴戜腑闂村姞浜嗕釜娑堟伅闃熷垪锛屽鏋滄秷鎭槦鍒楁寕浜嗘€庝箞鍔炲憿锛熸槸涓嶆槸 闄嶄綆浜嗙郴缁熺殑鍙敤鎬?/strong> 锛?/p>
閭h繖鏍锋槸涓嶆槸瑕佷繚璇丠A(楂樺彲鐢?锛熸槸涓嶆槸瑕佹悶闆嗙兢锛熼偅涔堟垜 鏁翠釜绯荤粺鐨勫鏉傚害鏄笉鏄笂鍗囦簡 锛?/p>
鎶涘紑涓婇潰鐨勯棶棰樹笉璁诧紝涓囦竴鎴戝彂閫佹柟鍙戦€佸け璐ヤ簡锛岀劧鍚庢墽琛岄噸璇曪紝杩欐牱灏卞彲鑳戒骇鐢熼噸澶嶇殑娑堟伅銆?/p>
鎴栬€呮垜娑堣垂绔鐞嗗け璐ヤ簡锛岃姹傞噸鍙戯紝杩欐牱涔熶細浜х敓閲嶅鐨勬秷鎭€?/p>
瀵逛簬涓€浜涘井鏈嶅姟鏉ヨ锛屾秷璐归噸澶嶆秷鎭細甯︽潵鏇村ぇ鐨勯夯鐑︼紝姣斿澧炲姞绉垎锛岃繖涓椂鍊欐垜鍔犱簡澶氭鏄笉鏄鍏朵粬鐢ㄦ埛涓嶅叕骞筹紵 閭d箞锛屽張 濡備綍瑙e喅閲嶅娑堣垂娑堟伅鐨勯棶棰?/strong> 鍛紵 濡傛灉鎴戜滑姝ゆ椂鐨勬秷鎭渶瑕佷繚璇佷弗鏍肩殑椤哄簭鎬ф€庝箞鍔炲憿锛熸瘮濡傜敓浜ц€呯敓浜т簡涓€绯诲垪鐨勬湁搴忔秷鎭?瀵逛竴涓猧d涓?鐨勮褰曡繘琛屽垹闄ゅ鍔犱慨鏀?锛屼絾鏄垜浠煡閬撳湪鍙戝竷璁㈤槄妯″瀷涓紝瀵逛簬涓婚鏄棤椤哄簭鐨勶紝閭d箞杩欎釜鏃跺€欏氨浼氬鑷村浜庢秷璐硅€呮秷璐规秷鎭殑鏃跺€欐病鏈夋寜鐓х敓浜ц€呯殑鍙戦€侀『搴忔秷璐癸紝姣斿杩欎釜鏃跺€欐垜浠秷璐圭殑椤哄簭涓轰慨鏀瑰垹闄ゅ鍔狅紝濡傛灉璇ヨ褰曟秹鍙婂埌閲戦鐨勮瘽鏄笉鏄細鍑哄ぇ浜嬫儏锛?/p>
閭d箞锛屽張 濡備綍瑙e喅娑堟伅鐨勯『搴忔秷璐归棶棰?/strong> 鍛紵 灏辨嬁鎴戜滑涓婇潰鎵€璁茬殑鍒嗗竷寮忕郴缁熸潵璇达紝鐢ㄦ埛璐エ瀹屾垚涔嬪悗鏄笉鏄渶瑕佸鍔犺处鎴风Н鍒嗭紵鍦ㄥ悓涓€涓郴缁熶腑鎴戜滑涓€鑸細浣跨敤浜嬪姟鏉ヨ繘琛岃В鍐筹紝濡傛灉鐢?nbsp; 閭d箞锛屽張濡備綍 瑙e喅鍒嗗竷寮忎簨鍔¢棶棰?/strong> 鍛紵 鎴戜滑鍒氬垰璇翠簡锛屾秷鎭槦鍒楀彲浠ヨ繘琛屽墛宄版搷浣滐紝閭e鏋滄垜鐨勬秷璐硅€呭鏋滄秷璐瑰緢鎱㈡垨鑰呯敓浜ц€呯敓浜ф秷鎭緢蹇紝杩欐牱鏄笉鏄細灏嗘秷鎭爢绉湪娑堟伅闃熷垪涓紵 閭d箞锛屽張濡備綍 瑙e喅娑堟伅鍫嗙Н鐨勯棶棰?/strong> 鍛紵 鍙敤鎬ч檷浣庯紝澶嶆潅搴︿笂鍗囷紝鍙堝甫鏉ヤ竴绯诲垪鐨勯噸澶嶆秷璐癸紝椤哄簭娑堣垂锛屽垎甯冨紡浜嬪姟锛屾秷鎭爢绉殑闂锛岃繖娑堟伅闃熷垪杩樻€庝箞鐢ㄥ晩馃樀锛?/p>
鍒€ワ紝鍔炴硶鎬绘槸鏈夌殑銆?/p>
鍝囷紝浣犱釜娣疯泲锛佷笂闈㈢粰鎴戞姏鍑洪偅涔堝闂锛屼綘鐜板湪鍙堣 鍒€ュ埆鎬ワ紝璇濊浣犵幇鍦ㄦ竻妤?nbsp; 搴熻瘽涓嶅璇达紝鎯宠浜嗚В 鍦ㄨ皥 棣栧厛鎴戦棶涓€涓棶棰橈紝娑堟伅闃熷垪涓轰粈涔堣鍙秷鎭槦鍒楋紵 浣犲彲鑳借寰楀緢寮辨櫤锛岃繖鐜╂剰涓嶅氨鏄瓨鏀炬秷鎭殑闃熷垪鍢涳紵涓嶅彨娑堟伅闃熷垪鍙粈涔堬紵 鐨勭‘锛屾棭鏈熺殑娑堟伅涓棿浠舵槸閫氳繃 闃熷垪 杩欎竴妯″瀷鏉ュ疄鐜扮殑锛屽彲鑳芥槸鍘嗗彶鍘熷洜锛屾垜浠兘涔犳儻鎶婃秷鎭腑闂翠欢鎴愪负娑堟伅闃熷垪銆?/p>
浣嗘槸锛屽浠婁緥濡?nbsp; 灏卞儚鎴戜滑鐞嗚В闃熷垪涓€鏍凤紝娑堟伅涓棿浠剁殑闃熷垪妯″瀷灏辩湡鐨勫彧鏄竴涓槦鍒椼€傘€傘€傛垜鐢讳竴寮犲浘缁欏ぇ瀹剁悊瑙c€?/p>
鍦ㄤ竴寮€濮嬫垜璺熶綘鎻愬埌浜嗕竴涓?nbsp;鈥滃箍鎾€?/strong> 鐨勬蹇碉紝涔熷氨鏄濡傛灉鎴戜滑姝ゆ椂鎴戜滑闇€瑕佸皢涓€涓秷鎭彂閫佺粰澶氫釜娑堣垂鑰?姣斿姝ゆ椂鎴戦渶瑕佸皢淇℃伅鍙戦€佺粰鐭俊绯荤粺鍜岄偖浠剁郴缁?锛岃繖涓椂鍊欏崟涓槦鍒楀嵆涓嶈兘婊¤冻闇€姹備簡銆?/p>
褰撶劧浣犲彲浠ヨ 閭d箞鏈夋病鏈夊ソ鐨勬柟娉曞幓瑙e喅杩欎竴涓棶棰樺憿锛熸湁锛岄偅灏辨槸 涓婚妯″瀷 鎴栬€呭彲浠ョО涓?nbsp;鍙戝竷璁㈤槄妯″瀷 銆?/p>
鎰熷叴瓒g殑鍚屽鍙互鍘讳簡瑙d竴涓嬭璁℃ā寮忛噷闈㈢殑瑙傚療鑰呮ā寮忓苟涓旀墜鍔ㄥ疄鐜颁竴涓嬶紝鎴戠浉淇′綘浼氭湁鎵€鏀惰幏鐨勩€?/p>
鍦ㄤ富棰樻ā鍨嬩腑锛屾秷鎭殑鐢熶骇鑰呯О涓?nbsp;鍙戝竷鑰?Publisher) 锛屾秷鎭殑娑堣垂鑰呯О涓?nbsp;璁㈤槄鑰?Subscriber) 锛屽瓨鏀炬秷鎭殑瀹瑰櫒绉颁负 涓婚(Topic) 銆?/p>
鍏朵腑锛屽彂甯冭€呭皢娑堟伅鍙戦€佸埌鎸囧畾涓婚涓紝璁㈤槄鑰呴渶瑕?nbsp;鎻愬墠璁㈤槄涓婚 鎵嶈兘鎺ュ彈鐗瑰畾涓婚鐨勬秷鎭€?/p>
鍏跺疄瀵逛簬涓婚妯″瀷鐨勫疄鐜版潵璇存瘡涓秷鎭腑闂翠欢鐨勫簳灞傝璁¢兘鏄笉涓€鏍风殑锛屽氨姣斿 鎵€浠ワ紝 鎴戜滑鍙互鐪嬪埌鍦ㄦ暣涓浘涓湁 浣犲彲浠ョ湅鍒板浘涓敓浜ц€呯粍涓殑鐢熶骇鑰呬細鍚戜富棰樺彂閫佹秷鎭紝鑰?nbsp;涓婚涓瓨鍦ㄥ涓槦鍒?/strong>锛岀敓浜ц€呮瘡娆$敓浜ф秷鎭箣鍚庢槸鎸囧畾涓婚涓殑鏌愪釜闃熷垪鍙戦€佹秷鎭殑銆?/p>
姣忎釜涓婚涓兘鏈夊涓槦鍒?杩欓噷杩樹笉娑夊強鍒?nbsp; 褰撶劧涔熷彲浠ユ秷璐硅€呬釜鏁板皬浜庨槦鍒椾釜鏁帮紝鍙笉杩囦笉澶缓璁€傚涓嬪浘銆?/p>
姣忎釜娑堣垂缁勫湪姣忎釜闃熷垪涓婄淮鎶や竴涓秷璐逛綅缃?/strong> 锛屼负浠€涔堝憿锛?/p>
鍥犱负鎴戜滑鍒氬垰鐢荤殑浠呬粎鏄竴涓秷璐硅€呯粍锛屾垜浠煡閬撳湪鍙戝竷璁㈤槄妯″紡涓竴鑸細娑夊強鍒板涓秷璐硅€呯粍锛岃€屾瘡涓秷璐硅€呯粍鍦ㄦ瘡涓槦鍒椾腑鐨勬秷璐逛綅缃兘鏄笉鍚岀殑銆傚鏋滄鏃舵湁澶氫釜娑堣垂鑰呯粍锛岄偅涔堟秷鎭涓€涓秷璐硅€呯粍娑堣垂瀹屼箣鍚庢槸涓嶄細鍒犻櫎鐨?鍥犱负鍏跺畠娑堣垂鑰呯粍涔熼渶瑕佸憖)锛屽畠浠呬粎鏄负姣忎釜娑堣垂鑰呯粍缁存姢涓€涓?nbsp;娑堣垂浣嶇Щ(offset) 锛屾瘡娆℃秷璐硅€呯粍娑堣垂瀹屼細杩斿洖涓€涓垚鍔熺殑鍝嶅簲锛岀劧鍚庨槦鍒楀啀鎶婄淮鎶ょ殑娑堣垂浣嶇Щ鍔犱竴锛岃繖鏍峰氨涓嶄細鍑虹幇鍒氬垰娑堣垂杩囩殑娑堟伅鍐嶄竴娆¤娑堣垂浜嗐€?/p>
鍙兘浣犺繕鏈変竴涓棶棰橈紝涓轰粈涔堜竴涓富棰樹腑闇€瑕佺淮鎶ゅ涓槦鍒?/strong> 锛?/p>
绛旀鏄?nbsp;鎻愰珮骞跺彂鑳藉姏 銆傜殑纭紝姣忎釜涓婚涓彧瀛樺湪涓€涓槦鍒椾篃鏄彲琛岀殑銆備綘鎯充竴涓嬶紝濡傛灉姣忎釜涓婚涓彧瀛樺湪涓€涓槦鍒楋紝杩欎釜闃熷垪涓篃缁存姢鐫€姣忎釜娑堣垂鑰呯粍鐨勬秷璐逛綅缃紝杩欐牱涔熷彲浠ュ仛鍒?nbsp;鍙戝竷璁㈤槄妯″紡 銆傚涓嬪浘銆?/p>
浣嗘槸锛岃繖鏍锋垜鐢熶骇鑰呮槸涓嶆槸鍙兘鍚戜竴涓槦鍒楀彂閫佹秷鎭紵鍙堝洜涓洪渶瑕佺淮鎶ゆ秷璐逛綅缃墍浠ヤ竴涓槦鍒楀彧鑳藉搴斾竴涓秷璐硅€呯粍涓殑娑堣垂鑰咃紝杩欐牱鏄笉鏄叾浠栫殑 鎵€浠ユ€荤粨鏉ヨ锛?code class="mq-234">RocketMQ 閫氳繃浣跨敤鍦ㄤ竴涓?nbsp; 璁插畬浜嗘秷鎭ā鍨嬶紝鎴戜滑鐞嗚В璧?nbsp; 杩欓噷锛屾垜杩樺緱鏅強涓€涓嬪叧浜?nbsp; 涓€涓?nbsp; 濡傛灉鏌愪釜 鎵€浠ヨ鎴戜滑闇€瑕侀厤缃涓狟roker銆?/p>
鍚畬浜嗕笂闈㈢殑瑙i噴浣犲彲鑳戒細瑙夊緱锛岃繖鐜╂剰濂界畝鍗曘€備笉灏辨槸杩欐牱鐨勪箞锛?/p>
鍡紵浣犲彲鑳戒細鍙戠幇涓€涓棶棰橈紝杩欒€佸浼?nbsp; 浣嗘槸锛屾垜浠笂鏂囨彁鍒拌繃 濡傛灉璇达紝鎴戜滑鐨勬秷璐硅€呭拰鐢熶骇鑰呯洿鎺ュ拰澶氫釜 濡傛灉杩樹笉鏄緢鐞嗚В鐨勮瘽锛屽彲浠ュ幓鐪嬫垜浠嬬粛 褰撶劧锛?code class="mq-322">RocketMQ 涓殑鎶€鏈灦鏋勮偗瀹氫笉姝㈠墠闈㈤偅涔堢畝鍗曪紝鍥犱负涓婇潰鍥句腑鐨勫洓涓鑹查兘鏄渶瑕佸仛闆嗙兢鐨勩€傛垜缁欏嚭涓€寮犲畼缃戠殑鏋舵瀯鍥撅紝澶у灏濊瘯鐞嗚В涓€涓嬨€?/p>
鍏跺疄鍜屾垜浠渶寮€濮嬬敾鐨勯偅寮犱篂涓愮増鐨勬灦鏋勫浘涔熸病浠€涔堝尯鍒紝涓昏鏄竴浜涚粏鑺備笂鐨勫樊鍒€傚惉鎴戠粏缁嗛亾鏉ヰ煠ㄣ€?/p>
绗竴銆佹垜浠殑 绗簩銆佷负浜嗕繚璇?nbsp; 绗笁銆佸湪鐢熶骇鑰呴渶瑕佸悜 绗洓銆佹秷璐硅€呴€氳繃 鍏跺疄锛岃繖浜涗笢瑗块兘鏄垜鍦ㄤ粙缁嶆秷鎭槦鍒楀甫鏉ョ殑涓€浜涘壇浣滅敤鐨勬椂鍊欐彁鍒扮殑锛屼篃灏辨槸璇达紝杩欎簺闂涓嶄粎浠呮寕閽╀簬 鍦ㄤ笂闈㈡垜浠嬬粛 鍏跺疄 鍦ㄤ笂闈㈢殑鎶€鏈灦鏋勪粙缁嶄腑锛屾垜浠凡缁忕煡閬撲簡 杩欏張鎵埌涓や釜姒傚康鈥斺€?span class="mq-388">鏅€氶『搴?/strong> 鍜?nbsp;涓ユ牸椤哄簭 銆?/p>
鎵€璋撴櫘閫氶『搴忔槸鎸?娑堣垂鑰呴€氳繃 鍚屼竴涓秷璐归槦鍒楁敹鍒扮殑娑堟伅鏄湁椤哄簭鐨?/strong> 锛屼笉鍚屾秷鎭槦鍒楁敹鍒扮殑娑堟伅鍒欏彲鑳芥槸鏃犻『搴忕殑銆傛櫘閫氶『搴忔秷鎭湪 鎵€璋撲弗鏍奸『搴忔槸鎸?娑堣垂鑰呮敹鍒扮殑 鎵€鏈夋秷鎭?/strong> 鍧囨槸鏈夐『搴忕殑銆備弗鏍奸『搴忔秷鎭?nbsp;鍗充娇鍦ㄥ紓甯告儏鍐典笅涔熶細淇濊瘉娑堟伅鐨勯『搴忔€?/strong> 銆?/p>
浣嗘槸锛屼弗鏍奸『搴忕湅璧锋潵铏藉ソ锛屽疄鐜板畠鍙細浠樺嚭宸ㄥぇ鐨勪唬浠枫€傚鏋滀綘浣跨敤涓ユ牸椤哄簭妯″紡锛?code class="mq-398">Broker 闆嗙兢涓彧瑕佹湁涓€鍙版満鍣ㄤ笉鍙敤锛屽垯鏁翠釜闆嗙兢閮戒笉鍙敤銆備綘杩樼敤鍟ワ紵鐜板湪涓昏鍦烘櫙涔熷氨鍦?nbsp; 涓€鑸€岃█锛屾垜浠殑 閭d箞锛屾垜浠幇鍦ㄤ娇鐢ㄤ簡 鏅€氶『搴忔ā寮?/strong> 锛屾垜浠粠涓婇潰瀛︿範鐭ラ亾浜嗗湪 閭d箞锛屾€庝箞瑙e喅鍛紵 鍏跺疄寰堢畝鍗曪紝鎴戜滑闇€瑕佸鐞嗙殑浠呬粎鏄皢鍚屼竴璇箟涓嬬殑娑堟伅鏀惧叆鍚屼竴涓槦鍒?姣斿杩欓噷鏄悓涓€涓鍗?锛岄偅鎴戜滑灏卞彲浠ヤ娇鐢?nbsp;Hash鍙栨ā娉?/strong> 鏉ヤ繚璇佸悓涓€涓鍗曞湪鍚屼竴涓槦鍒椾腑灏辫浜嗐€?/p>
emmm锛屽氨涓や釜瀛椻€斺€?nbsp;骞傜瓑 銆傚湪缂栫▼涓竴涓?em class="mq-416">骞傜瓑 鎿嶄綔鐨勭壒鐐规槸鍏朵换鎰忓娆℃墽琛屾墍浜х敓鐨勫奖鍝嶅潎涓庝竴娆℃墽琛岀殑褰卞搷鐩稿悓銆傛瘮濡傝锛岃繖涓椂鍊欐垜浠湁涓€涓鍗曠殑澶勭悊绉垎鐨勭郴缁燂紝姣忓綋鏉ヤ竴涓秷鎭殑鏃跺€欏畠灏辫礋璐d负鍒涘缓杩欎釜璁㈠崟鐨勭敤鎴风殑绉垎鍔犱笂鐩稿簲鐨勬暟鍊笺€傚彲鏄湁涓€娆★紝娑堟伅闃熷垪鍙戦€佺粰璁㈠崟绯荤粺 FrancisQ 鐨勮鍗曚俊鎭紝鍏惰姹傛槸缁?FrancisQ 鐨勭Н鍒嗗姞涓?500銆備絾鏄Н鍒嗙郴缁熷湪鏀跺埌 FrancisQ 鐨勮鍗曚俊鎭鐞嗗畬鎴愪箣鍚庤繑鍥炵粰娑堟伅闃熷垪澶勭悊鎴愬姛鐨勪俊鎭殑鏃跺€欏嚭鐜颁簡缃戠粶娉㈠姩(褰撶劧杩樻湁寰堝绉嶆儏鍐碉紝姣斿Broker鎰忓閲嶅惎绛夌瓑)锛岃繖鏉″洖搴旀病鏈夊彂閫佹垚鍔熴€?/p>
閭d箞锛屾秷鎭槦鍒楁病鏀跺埌绉垎绯荤粺鐨勫洖搴斾細涓嶄細灏濊瘯閲嶅彂杩欎釜娑堟伅锛熼棶棰樺氨鏉ヤ簡锛屾垜鍐嶅彂杩欎釜娑堟伅锛屼竾涓€瀹冨張缁?FrancisQ 鐨勮处鎴峰姞涓?500 绉垎鎬庝箞鍔炲憿锛?/p>
鎵€浠ユ垜浠渶瑕佺粰鎴戜滑鐨勬秷璐硅€呭疄鐜?nbsp;骞傜瓑 锛屼篃灏辨槸瀵瑰悓涓€涓秷鎭殑澶勭悊缁撴灉锛屾墽琛屽灏戞閮戒笉鍙樸€?/p>
閭d箞濡備綍缁欎笟鍔″疄鐜板箓绛夊憿锛熻繖涓繕鏄渶瑕佺粨鍚堝叿浣撶殑涓氬姟鐨勩€備綘鍙互浣跨敤 鍐欏叆 涓嶈繃鏈€涓昏鐨勮繕鏄渶瑕?nbsp;鏍规嵁鐗瑰畾鍦烘櫙浣跨敤鐗瑰畾鐨勮В鍐虫柟妗?/strong> 锛屼綘瑕佺煡閬撲綘鐨勬秷鎭秷璐规槸鍚︽槸瀹屽叏涓嶅彲閲嶅娑堣垂杩樻槸鍙互蹇嶅彈閲嶅娑堣垂鐨勶紝鐒跺悗鍐嶉€夋嫨寮烘牎楠屽拰寮辨牎楠岀殑鏂瑰紡銆傛瘯绔熷湪 CS 棰嗗煙杩樻槸寰堝皯鏈夋妧鏈摱寮圭殑璇存硶銆?/p>
鑰屽湪鏁翠釜浜掕仈缃戦鍩燂紝骞傜瓑涓嶄粎浠呴€傜敤浜庢秷鎭槦鍒楃殑閲嶅娑堣垂闂锛岃繖浜涘疄鐜板箓绛夌殑鏂规硶锛屼篃鍚屾牱閫傜敤浜庯紝鍦ㄥ叾浠栧満鏅腑鏉ヨВ鍐抽噸澶嶈姹傛垨鑰呴噸澶嶈皟鐢ㄧ殑闂 銆傛瘮濡傚皢HTTP鏈嶅姟璁捐鎴愬箓绛夌殑锛?span class="mq-431">瑙e喅鍓嶇鎴栬€匒PP閲嶅鎻愪氦琛ㄥ崟鏁版嵁鐨勯棶棰?/strong> 锛屼篃鍙互灏嗕竴涓井鏈嶅姟璁捐鎴愬箓绛夌殑锛岃В鍐?nbsp; 濡備綍瑙i噴鍒嗗竷寮忎簨鍔″憿锛熶簨鍔″ぇ瀹堕兘鐭ラ亾鍚э紵瑕佷箞閮芥墽琛岃涔堥兘涓嶆墽琛?/strong> 銆傚湪鍚屼竴涓郴缁熶腑鎴戜滑鍙互杞绘澗鍦板疄鐜颁簨鍔★紝浣嗘槸鍦ㄥ垎甯冨紡鏋舵瀯涓紝鎴戜滑鏈夊緢澶氭湇鍔℃槸閮ㄧ讲鍦ㄤ笉鍚岀郴缁熶箣闂寸殑锛岃€屼笉鍚屾湇鍔′箣闂村張闇€瑕佽繘琛岃皟鐢ㄣ€傛瘮濡傛鏃舵垜涓嬭鍗曠劧鍚庡鍔犵Н鍒嗭紝濡傛灉淇濊瘉涓嶄簡鍒嗗竷寮忎簨鍔$殑璇濓紝灏变細鍑虹幇A绯荤粺涓嬩簡璁㈠崟锛屼絾鏄疊绯荤粺澧炲姞绉垎澶辫触鎴栬€匒绯荤粺娌℃湁涓嬭鍗曪紝B绯荤粺鍗村鍔犱簡绉垎銆傚墠鑰呭鐢ㄦ埛涓嶅弸濂斤紝鍚庤€呭杩愯惀鍟嗕笉鍒╋紝杩欐槸鎴戜滑閮戒笉鎰挎剰瑙佸埌鐨勩€?/p>
閭d箞锛屽浣曞幓瑙e喅杩欎釜闂鍛紵 濡備粖姣旇緝甯歌鐨勫垎甯冨紡浜嬪姟瀹炵幇鏈?2PC銆乀CC 鍜屼簨鍔℃秷鎭?half 鍗婃秷鎭満鍒?銆傛瘡涓€绉嶅疄鐜伴兘鏈夊叾鐗瑰畾鐨勪娇鐢ㄥ満鏅紝浣嗘槸涔熸湁鍚勮嚜鐨勯棶棰橈紝閮戒笉鏄畬缇庣殑瑙e喅鏂规銆?/p>
鍦?nbsp; 鍦ㄧ涓€姝ュ彂閫佺殑 half 娑堟伅 锛屽畠鐨勬剰鎬濇槸 鍦ㄤ簨鍔℃彁浜や箣鍓嶏紝瀵逛簬娑堣垂鑰呮潵璇达紝杩欎釜娑堟伅鏄笉鍙鐨?/strong> 銆?/p>
閭d箞锛屽浣曞仛鍒板啓鍏ユ秷鎭絾鏄鐢ㄦ埛涓嶅彲瑙佸憿锛烺ocketMQ浜嬪姟娑堟伅鐨勫仛娉曟槸锛氬鏋滄秷鎭槸half娑堟伅锛屽皢澶囦唤鍘熸秷鎭殑涓婚涓庢秷鎭秷璐归槦鍒楋紝鐒跺悗 鏀瑰彉涓婚 涓篟MQ_SYS_TRANS_HALF_TOPIC銆傜敱浜庢秷璐圭粍鏈闃呰涓婚锛屾晠娑堣垂绔棤娉曟秷璐筯alf绫诲瀷鐨勬秷鎭紝鐒跺悗RocketMQ浼氬紑鍚竴涓畾鏃朵换鍔★紝浠嶵opic涓篟MQ_SYS_TRANS_HALF_TOPIC涓媺鍙栨秷鎭繘琛屾秷璐?/strong>锛屾牴鎹敓浜ц€呯粍鑾峰彇涓€涓湇鍔℃彁渚涜€呭彂閫佸洖鏌ヤ簨鍔$姸鎬佽姹傦紝鏍规嵁浜嬪姟鐘舵€佹潵鍐冲畾鏄彁浜ゆ垨鍥炴粴娑堟伅銆?/p>
浣犲彲浠ヨ瘯鎯充竴涓嬶紝濡傛灉娌℃湁浠庣5姝ュ紑濮嬬殑 浜嬪姟鍙嶆煡鏈哄埗 锛屽鏋滃嚭鐜扮綉璺尝鍔ㄧ4姝ユ病鏈夊彂閫佹垚鍔燂紝杩欐牱灏变細浜х敓 MQ 涓嶇煡閬撴槸涓嶆槸闇€瑕佺粰娑堣垂鑰呮秷璐圭殑闂锛屼粬灏卞儚涓€涓棤澶磋媿铦囦竴鏍枫€傚湪 浣犺繕闇€瑕佹敞鎰忕殑鏄紝鍦?nbsp; 鍦ㄤ笂闈㈡垜浠彁鍒颁簡娑堟伅闃熷垪涓€涓緢閲嶈鐨勫姛鑳解€斺€?span class="mq-464">鍓婂嘲 銆傞偅涔堝鏋滆繖涓嘲鍊煎お澶т簡瀵艰嚧娑堟伅鍫嗙Н鍦ㄩ槦鍒椾腑鎬庝箞鍔炲憿锛?/p>
鍏跺疄杩欎釜闂鍙互灏嗗畠骞夸箟鍖栵紝鍥犱负浜х敓娑堟伅鍫嗙Н鐨勬牴婧愬叾瀹炲氨鍙湁涓や釜鈥斺€旂敓浜ц€呯敓浜уお蹇垨鑰呮秷璐硅€呮秷璐瑰お鎱€?/p>
鎴戜滑鍙互浠庡涓搴﹀幓鎬濊€冭В鍐宠繖涓棶棰橈紝褰撴祦閲忓埌宄板€肩殑鏃跺€欐槸鍥犱负鐢熶骇鑰呯敓浜уお蹇紝鎴戜滑鍙互浣跨敤涓€浜?nbsp;闄愭祦闄嶇骇 鐨勬柟娉曪紝褰撶劧浣犱篃鍙互澧炲姞澶氫釜娑堣垂鑰呭疄渚嬪幓姘村钩鎵╁睍澧炲姞娑堣垂鑳藉姏鏉ュ尮閰嶇敓浜х殑婵€澧炪€傚鏋滄秷璐硅€呮秷璐硅繃鎱㈢殑璇濓紝鎴戜滑鍙互鍏堟鏌?nbsp;鏄惁鏄秷璐硅€呭嚭鐜颁簡澶ч噺鐨勬秷璐归敊璇?/strong> 锛屾垨鑰呮墦鍗颁竴涓嬫棩蹇楁煡鐪嬫槸鍚︽槸鍝竴涓嚎绋嬪崱姝伙紝鍑虹幇浜嗛攣璧勬簮涓嶉噴鏀剧瓑绛夌殑闂銆?/p>
褰撶劧锛屾渶蹇€熻В鍐虫秷鎭爢绉棶棰樼殑鏂规硶杩樻槸澧炲姞娑堣垂鑰呭疄渚嬶紝涓嶈繃 鍚屾椂浣犺繕闇€瑕佸鍔犳瘡涓富棰樼殑闃熷垪鏁伴噺 銆?/p>
鍒繕浜嗗湪 鍥炴函娑堣垂鏄寚 杩欐槸瀹樻柟鏂囨。鐨勮В閲婏紝鎴戠洿鎺ョ収鎼繃鏉ュ氨褰撶鏅簡馃榿馃榿馃榿銆?/p>
涓婇潰鎴戣浜嗛偅涔堝鐨?nbsp; 鍦?nbsp; 闃熷垪涓殑娑堟伅鍙堟槸濡備綍杩涜瀛樺偍鎸佷箙鍖栫殑鍛紵 鎴戝湪涓婃枃涓彁鍒扮殑 鍚屾鍒风洏 鍜?nbsp;寮傛鍒风洏 鍙堟槸浠€涔堝憿锛熷畠浠細缁欐寔涔呭寲甯︽潵浠€涔堟牱鐨勫奖鍝嶅憿锛?/p>
涓嬮潰鎴戝皢缁欎綘浠竴涓€瑙i噴銆?/p>
濡備笂鍥炬墍绀猴紝鍦ㄥ悓姝ュ埛鐩樹腑闇€瑕佺瓑寰呬竴涓埛鐩樻垚鍔熺殑 鑰屽紓姝ュ埛鐩樺線寰€鏄紑鍚竴涓嚎绋嬪幓寮傛鍦版墽琛屽埛鐩樻搷浣溿€傛秷鎭埛鐩橀噰鐢ㄥ悗鍙板紓姝ョ嚎绋嬫彁浜ょ殑鏂瑰紡杩涜锛?nbsp;闄嶄綆浜嗚鍐欏欢杩?/strong> 锛屾彁楂樹簡 涓€鑸湴锛?span class="mq-514">寮傛鍒风洏鍙湁鍦?nbsp; 涓婇潰鐨勫悓姝ュ埛鐩樺拰寮傛鍒风洏鏄湪鍗曚釜缁撶偣灞傞潰鐨勶紝鑰屽悓姝ュ鍒跺拰寮傛澶嶅埗涓昏鏄寚鐨?nbsp; 鍚屾澶嶅埗锛氫篃鍙?鈥滃悓姝ュ弻鍐欌€濓紝涔熷氨鏄锛?span class="mq-523">鍙湁娑堟伅鍚屾鍙屽啓鍒颁富浠庣粨鐐逛笂鏃舵墠杩斿洖鍐欏叆鎴愬姛 銆?/p> 寮傛澶嶅埗锛?nbsp;娑堟伅鍐欏叆涓昏妭鐐逛箣鍚庡氨鐩存帴杩斿洖鍐欏叆鎴愬姛 銆?/p> 鐒惰€岋紝寰堝浜嬫儏鏄病鏈夊畬缇庣殑鏂规鐨勶紝灏辨瘮濡傛垜浠繘琛屾秷鎭啓鍏ョ殑鑺傜偣瓒婂灏辨洿鑳戒繚璇佹秷鎭殑鍙潬鎬э紝浣嗘槸闅忎箣鐨勬€ц兘涔熶細涓嬮檷锛屾墍浠ラ渶瑕佺▼搴忓憳鏍规嵁鐗瑰畾涓氬姟鍦烘櫙鍘婚€夋嫨閫傚簲鐨勪富浠庡鍒舵柟妗堛€?/p>
閭d箞锛?span class="mq-527">寮傛澶嶅埗浼氫笉浼氫篃鍍忓紓姝ュ埛鐩橀偅鏍峰奖鍝嶆秷鎭殑鍙潬鎬у憿锛?/strong> 绛旀鏄笉浼氱殑锛屽洜涓轰袱鑰呭氨鏄笉鍚岀殑姒傚康锛屽浜庢秷鎭彲闈犳€ф槸閫氳繃涓嶅悓鐨勫埛鐩樼瓥鐣ヤ繚璇佺殑锛岃€屽儚寮傛鍚屾澶嶅埗绛栫暐浠呬粎鏄奖鍝嶅埌浜?nbsp;鍙敤鎬?/strong> 銆備负浠€涔堝憿锛熷叾涓昏鍘熷洜鏄?nbsp; 姣斿杩欎釜鏃跺€欓噰鐢ㄥ紓姝ュ鍒剁殑鏂瑰紡锛屽湪涓昏妭鐐硅繕鏈彂閫佸畬闇€瑕佸悓姝ョ殑娑堟伅鐨勬椂鍊欎富鑺傜偣鎸傛帀浜嗭紝杩欎釜鏃跺€欎粠鑺傜偣灏卞皯浜嗕竴閮ㄥ垎娑堟伅銆備絾鏄鏃剁敓浜ц€呮棤娉曞啀缁欎富鑺傜偣鐢熶骇娑堟伅浜嗭紝娑堣垂鑰呭彲浠ヨ嚜鍔ㄥ垏鎹㈠埌浠庤妭鐐硅繘琛屾秷璐?/strong>(浠呬粎鏄秷璐?锛屾墍浠ュ湪涓昏妭鐐规寕鎺夌殑鏃堕棿鍙細浜х敓涓讳粠缁撶偣鐭殏鐨勬秷鎭笉涓€鑷寸殑鎯呭喌锛岄檷浣庝簡鍙敤鎬э紝鑰屽綋涓昏妭鐐归噸鍚箣鍚庯紝浠庤妭鐐归偅閮ㄥ垎鏈潵寰楀強澶嶅埗鐨勬秷鎭繕浼氱户缁鍒躲€?/p>
鍦ㄥ崟涓讳粠鏋舵瀯涓紝濡傛灉涓€涓富鑺傜偣鎸傛帀浜嗭紝閭d箞涔熷氨鎰忓懗鐫€鏁翠釜绯荤粺涓嶈兘鍐嶇敓浜т簡銆傞偅涔堣繖涓彲鐢ㄦ€х殑闂鑳藉惁瑙e喅鍛紵涓€涓富浠庝笉琛岄偅灏卞涓富浠庣殑鍛?/strong>锛屽埆蹇樹簡鍦ㄦ垜浠渶鍒濈殑鏋舵瀯鍥句腑锛屾瘡涓?nbsp; 浣嗘槸杩欑澶嶅埗鏂瑰紡鍚屾牱涔熶細甯︽潵涓€涓棶棰橈紝閭e氨鏄棤娉曚繚璇?nbsp;涓ユ牸椤哄簭 銆傚湪涓婃枃涓垜浠彁鍒颁簡濡備綍淇濊瘉鐨勬秷鎭『搴忔€ф槸閫氳繃灏嗕竴涓涔夌殑娑堟伅鍙戦€佸湪鍚屼竴涓槦鍒椾腑锛屼娇鐢?nbsp; 鑰屽湪 涔熶笉鏄 杩樿寰椾笂闈㈡垜浠竴寮€濮嬬殑涓変釜闂鍚楋紵鍒拌繖閲岀涓変釜闂宸茬粡瑙e喅浜嗐€?/p>
浣嗘槸锛屽湪 鎬荤粨鏉ヨ锛屾暣涓秷鎭瓨鍌ㄧ殑缁撴瀯锛屾渶涓昏鐨勫氨鏄?nbsp; 鑰?nbsp; 鎵€浠ワ紝鍦?nbsp; 璁插埌杩欓噷锛屼綘鍙兘瀵?nbsp; emmm锛屾槸涓嶆槸鏈変竴鐐瑰鏉傪煠o紝鐪嬭嫳鏂囧浘鐗囧拰鑻辨枃鏂囨。鐨勬椂鍊欏氨涓嶈鎬傦紝纭潃澶寸毊寰€涓嬬湅灏辫銆?/p>
濡傛灉涓婇潰娌$湅鎳傜殑璇昏€呬竴瀹氳璁ょ湡鐪嬩笅闈㈢殑娴佺▼鍒嗘瀽锛?/p>
棣栧厛锛屽湪鏈€涓婇潰鐨勯偅涓€鍧楀氨鏄垜鍒氬垰璁茬殑浣犵幇鍦ㄥ彲浠ョ洿鎺?nbsp;鎶?nbsp; 鍦ㄥ浘涓渶宸﹁竟璇存槑浜?nbsp;绾㈣壊鏂瑰潡 浠h〃琚啓鍏ョ殑娑堟伅锛岃櫄绾挎柟鍧椾唬琛ㄧ瓑寰呰鍐欏叆鐨勩€傚乏杈圭殑鐢熶骇鑰呭彂閫佹秷鎭細鎸囧畾 涓婅堪灏辨槸鎴戝浜庢暣涓秷鎭瓨鍌ㄦ灦鏋勭殑澶ф鐞嗚В(杩欓噷涓嶆秹鍙婂埌涓€浜涚粏鑺傝璁猴紝姣斿绋€鐤忕储寮曠瓑绛夐棶棰?锛屽笇鏈涘浣犳湁甯姪銆?/p>
鍥犱负鏈変竴涓煡璇嗙偣鍥犱负鍐欏棬浜嗗繕璁蹭簡锛屾兂鎯冲湪鍝噷鍔犱篃涓嶅ソ锛屾墍浠ユ垜鐣欑粰澶у鍘绘€濊€凁煠旔煠斾竴涓嬪惂銆?/p>
涓轰粈涔?nbsp; 鎬荤畻鎶婅繖绡囧崥瀹㈠啓瀹屼簡銆傛垜璁茬殑浣犱滑杩樿寰楀悧馃槄锛?/p>
杩欑瘒鏂囩珷涓垜涓昏鎯冲ぇ瀹朵粙缁嶄簡 娑堟伅闃熷垪鍑虹幇鐨勫師鍥?/span> 娑堟伅闃熷垪鐨勪綔鐢?寮傛锛岃В鑰︼紝鍓婂嘲) 娑堟伅闃熷垪甯︽潵鐨勪竴绯诲垪闂(娑堟伅鍫嗙Н銆侀噸澶嶆秷璐广€侀『搴忔秷璐广€佸垎甯冨紡浜嬪姟绛夌瓑) 娑堟伅闃熷垪鐨勪袱绉嶆秷鎭ā鍨嬧€斺€旈槦鍒楀拰涓婚妯″紡 鍒嗘瀽浜?nbsp; 缁撳悎 浠嬬粛浜?nbsp; 绛夌瓑銆傘€傘€?/p>
濡傛灉鍠滄鍙互鐐硅禐鍝燄煈嶐煈嶐煈嶃€?/p>
以上是关于鍐掔潃鏈熸湯鎸傜鐨勯闄╀篃瑕佺粰浣犵湅鐨勬秷鎭槦鍒楀拰RocketMQ鍏ラ棬鎬荤粨的主要内容,如果未能解决你的问题,请参考以下文章 鎯宠缂栫▼浣滃搧涓婃。娆★紝浣犵湡鐨勯渶瑕佸浼氭暟鎹彲瑙嗗寲 Jmeter 缂栧啓鎺ュ彛娴嬭瘯鐢ㄤ緥閬囧埌鐨勯棶棰樺強瑙e喅鍔炴硶Dubbo
灏辨槸涓€涓€傜敤浜庡悇涓郴缁熶箣闂村悓姝ラ€氫俊鐨?nbsp;RPC
妗嗘灦銆?/p>
瑙h€?/span>
result
锛岃繖涓滆タ鎶借薄鍑烘潵灏辨槸璐エ鐨勫鐞嗙粨鏋滃憖锛屾瘮濡傝鍗曞彿锛岀敤鎴疯处鍙风瓑绛夛紝涔熷氨鏄鎴戜滑鍚庨潰鐨勪竴绯诲垪鏈嶅姟閮芥槸闇€瑕佸悓鏍风殑娑堟伅鏉ヨ繘琛屽鐞嗐€傛棦鐒惰繖鏍凤紝鎴戜滑鏄笉鏄彲浠ラ€氳繃 鈥滃箍鎾秷鎭€?/strong> 鏉ュ疄鐜般€?/p>
璁㈢エ
锛屾垜浠喘涔扮郴缁熶綔涓轰竴涓敓浜ц€呭幓鐢熶骇杩欐潯娑堟伅鏀惧叆娑堟伅闃熷垪锛岀劧鍚庢秷璐硅€呰闃呬簡杩欎釜涓婚锛屼細浠庢秷鎭槦鍒椾腑鎷夊彇娑堟伅骞舵秷璐广€傚氨姣斿鎴戜滑鍒氬垰鐢荤殑閭e紶鍥撅紝浣犱細鍙戠幇锛屽湪鐢熶骇鑰呰繖杈规垜浠彧闇€瑕佸叧娉?nbsp;鐢熶骇娑堟伅鍒版寚瀹氫富棰樹腑 锛岃€?nbsp;娑堣垂鑰呭彧闇€瑕佸叧娉ㄤ粠鎸囧畾涓婚涓媺鍙栨秷鎭?/strong> 灏辫浜嗐€?/p>
鍓婂嘲
娑堟伅闃熷垪鑳藉甫鏉ヤ粈涔堝ソ澶勶紵
娑堟伅闃熷垪浼氬甫鏉ュ壇浣滅敤鍚楋紵
Spring
鐨勮瘽鎴戜滑鍦ㄤ笂闈吉浠g爜涓姞鍏?nbsp;@Transactional
娉ㄨВ灏卞ソ浜嗐€備絾鏄湪涓嶅悓绯荤粺涓浣曚繚璇佷簨鍔″憿锛熸€讳笉鑳借繖涓郴缁熸垜鎵i挶鎴愬姛浜嗕綘閭gН鍒嗙郴缁熺Н鍒嗘病鍔犲惂锛熸垨鑰呰鎴戣繖鎵i挶鏄庢槑澶辫触浜嗭紝浣犻偅绉垎绯荤粺缁欐垜鍔犱簡绉垎銆?/p>
RocketMQ鏄粈涔堬紵
RocketMQ
锛岃繕璁╀笉璁╀汉娲讳簡锛燂紒馃がMQ
鐨勬瀯閫犲悧锛屾垜杩樻病璁插憿锛屾垜浠厛鎼炴槑鐧?nbsp;MQ
鐨勫唴閮ㄦ瀯閫狅紝鍐嶆潵鐪嬬湅濡備綍瑙e喅涓婇潰鐨勪竴绯诲垪闂鍚э紝涓嶈繃浣犳渶濂藉甫鐫€闂鍘婚槄璇诲拰浜嗚В鍠斻€?/p>
RocketMQ
鏄竴涓?nbsp;闃熷垪妯″瀷 鐨勬秷鎭腑闂翠欢锛屽叿鏈?span class="mq-128">楂樻€ц兘銆侀珮鍙潬銆侀珮瀹炴椂銆佸垎甯冨紡 鐨勭壒鐐广€傚畠鏄竴涓噰鐢?nbsp;Java
璇█寮€鍙戠殑鍒嗗竷寮忕殑娑堟伅绯荤粺锛岀敱闃块噷宸村反鍥㈤槦寮€鍙戯紝鍦?016骞村簳璐$尞缁?nbsp;Apache
锛屾垚涓轰簡 Apache
鐨勪竴涓《绾ч」鐩€傚湪闃块噷鍐呴儴锛?code class="mq-132">RocketMQ 寰堝ソ鍦版湇鍔′簡闆嗗洟澶уぇ灏忓皬涓婂崈涓簲鐢紝鍦ㄦ瘡骞寸殑鍙屽崄涓€褰撳ぉ锛屾洿鏈変笉鍙€濊鐨勪竾浜跨骇娑堟伅閫氳繃 RocketMQ
娴佽浆銆?/p>
RocketMQ
鍘嗗彶鐨勫悓瀛﹀彲浠ヨ嚜宸卞幓鎼滃璧勬枡銆傚惉瀹屼笂闈㈢殑浠嬬粛锛屼綘鍙鐭ラ亾 RocketMQ
寰堝揩銆佸緢鐗涖€佽€屼笖缁忓巻杩囧弻鍗佷竴鐨勫疄璺靛氨琛屼簡锛?/p>
闃熷垪妯″瀷鍜屼富棰樻ā鍨?/span>
RocketMQ
鐨勬妧鏈灦鏋勪箣鍓嶏紝鎴戜滑鍏堟潵浜嗚В涓€涓嬩袱涓悕璇嶆蹇碘€斺€?span class="mq-141">闃熷垪妯″瀷 鍜?nbsp;涓婚妯″瀷 銆?/p>
RocketMQ
銆?code class="mq-149">Kafka 杩欎簺浼樼鐨勬秷鎭腑闂翠欢涓嶄粎浠呮槸閫氳繃涓€涓?nbsp;闃熷垪 鏉ュ疄鐜版秷鎭瓨鍌ㄧ殑銆?/p>
闃熷垪妯″瀷
Producer
鐢熶骇娑堟伅鏀惧叆澶氫釜闃熷垪涓紝鐒跺悗姣忎釜闃熷垪鍘诲搴旀瘡涓€涓秷璐硅€呫€傞棶棰樻槸鍙互瑙e喅锛屽垱寤哄涓槦鍒楀苟涓斿鍒跺浠芥秷鎭槸浼氬緢褰卞搷璧勬簮鍜屾€ц兘鐨勩€傝€屼笖锛岃繖鏍峰瓙灏变細瀵艰嚧鐢熶骇鑰呴渶瑕佺煡閬撳叿浣撴秷璐硅€呬釜鏁扮劧鍚庡幓澶嶅埗瀵瑰簲鏁伴噺鐨勬秷鎭槦鍒楋紝杩欏氨杩濊儗鎴戜滑娑堟伅涓棿浠剁殑 瑙h€?/strong> 杩欎竴鍘熷垯銆?/p>
涓婚妯″瀷
RocketMQ涓殑娑堟伅妯″瀷
RockerMQ
涓殑娑堟伅妯″瀷灏辨槸鎸夌収 涓婚妯″瀷 鎵€瀹炵幇鐨勩€備綘鍙兘浼氬ソ濂囪繖涓?nbsp;涓婚 鍒板簳鏄€庝箞瀹炵幇鐨勫憿锛熶綘涓婇潰涔熸病鏈夎鍒板憖锛?/p>
Kafka
涓殑 鍒嗗尯 锛?code class="mq-185">RocketMQ 涓殑 闃熷垪 锛?code class="mq-187">RabbitMQ 涓殑 Exchange
銆傛垜浠彲浠ョ悊瑙d负 涓婚妯″瀷/鍙戝竷璁㈤槄妯″瀷 灏辨槸涓€涓爣鍑嗭紝閭d簺涓棿浠跺彧涓嶈繃鐓х潃杩欎釜鏍囧噯鍘诲疄鐜拌€屽凡銆?/p>
RocketMQ
涓殑 涓婚妯″瀷 鍒板簳鏄浣曞疄鐜扮殑鍛紵棣栧厛鎴戠敾涓€寮犲浘锛屽ぇ瀹跺皾璇曠潃鍘荤悊瑙d竴涓嬨€?/p>
Producer Group
銆?code class="mq-197">Topic 銆?code class="mq-198">Consumer Group 涓変釜瑙掕壊锛屾垜鏉ュ垎鍒粙缁嶄竴涓嬩粬浠€?/p>
Producer Group
鐢熶骇鑰呯粍锛氫唬琛ㄦ煇涓€绫荤殑鐢熶骇鑰咃紝姣斿鎴戜滑鏈夊涓鏉€绯荤粺浣滀负鐢熶骇鑰咃紝杩欏涓悎鍦ㄤ竴璧峰氨鏄竴涓?nbsp;Producer Group
鐢熶骇鑰呯粍锛屽畠浠竴鑸敓浜х浉鍚岀殑娑堟伅銆?/p>Consumer Group
娑堣垂鑰呯粍锛氫唬琛ㄦ煇涓€绫荤殑娑堣垂鑰咃紝姣斿鎴戜滑鏈夊涓煭淇$郴缁熶綔涓烘秷璐硅€咃紝杩欏涓悎鍦ㄤ竴璧峰氨鏄竴涓?nbsp;Consumer Group
娑堣垂鑰呯粍锛屽畠浠竴鑸秷璐圭浉鍚岀殑娑堟伅銆?/p>Topic
涓婚锛氫唬琛ㄤ竴绫绘秷鎭紝姣斿璁㈠崟娑堟伅锛岀墿娴佹秷鎭瓑绛夈€?/p>Broker
)锛岄泦缇ゆ秷璐规ā寮忎笅锛屼竴涓秷璐硅€呴泦缇ゅ鍙版満鍣ㄥ叡鍚屾秷璐逛竴涓?nbsp;topic
鐨勫涓槦鍒楋紝涓€涓槦鍒楀彧浼氳涓€涓秷璐硅€呮秷璐?/strong>銆傚鏋滄煇涓秷璐硅€呮寕鎺夛紝鍒嗙粍鍐呭叾瀹冩秷璐硅€呬細鎺ユ浛鎸傛帀鐨勬秷璐硅€呯户缁秷璐广€傚氨鍍忎笂鍥句腑 Consumer1
鍜?nbsp;Consumer2
鍒嗗埆瀵瑰簲鐫€涓や釜闃熷垪锛岃€?nbsp;Consuer3
鏄病鏈夐槦鍒楀搴旂殑锛屾墍浠ヤ竴鑸潵璁茶鎺у埗 娑堣垂鑰呯粍涓殑娑堣垂鑰呬釜鏁板拰涓婚涓槦鍒椾釜鏁扮浉鍚?/strong> 銆?/p>
Consumer
灏辨病鏈夌敤姝︿箣鍦颁簡锛熶粠杩欎袱涓搴︽潵璁诧紝骞跺彂搴︿竴涓嬪瓙灏卞皬浜嗗緢澶氥€?/p>
Topic
涓厤缃涓槦鍒楀苟涓旀瘡涓槦鍒楃淮鎶ゆ瘡涓秷璐硅€呯粍鐨勬秷璐逛綅缃?/strong> 瀹炵幇浜?nbsp;涓婚妯″紡/鍙戝竷璁㈤槄妯″紡 銆?/p>
RocketMQ鐨勬灦鏋勫浘
RocketMQ
鐨勬妧鏈灦鏋勮捣鏉ュ氨瀹规槗澶氫簡銆?/p>
RocketMQ
鎶€鏈灦鏋勪腑鏈夊洓澶ц鑹?nbsp;NameServer
銆?code class="mq-245">Broker 銆?code class="mq-246">Producer 銆?code class="mq-247">Consumer 銆傛垜鏉ュ悜澶у鍒嗗埆瑙i噴涓€涓嬭繖鍥涗釜瑙掕壊鏄共鍟ョ殑銆?/p>
Broker
锛氫富瑕佽礋璐f秷鎭殑瀛樺偍銆佹姇閫掑拰鏌ヨ浠ュ強鏈嶅姟楂樺彲鐢ㄤ繚璇併€傝鐧戒簡灏辨槸娑堟伅闃熷垪鏈嶅姟鍣ㄥ槢锛岀敓浜ц€呯敓浜ф秷鎭埌 Broker
锛屾秷璐硅€呬粠 Broker
鎷夊彇娑堟伅骞舵秷璐广€?/p>Broker
銆?code class="mq-255">Topic 鍜?闃熷垪鐨勫叧绯汇€備笂闈㈡垜璁茶В浜?nbsp;Topic
鍜岄槦鍒楃殑鍏崇郴鈥斺€斾竴涓?nbsp;Topic
涓瓨鍦ㄥ涓槦鍒楋紝閭d箞杩欎釜 Topic
鍜岄槦鍒楀瓨鏀惧湪鍝憿锛?/p>Topic
鍒嗗竷鍦ㄥ涓?nbsp;Broker
涓婏紝涓€涓?nbsp;Broker
鍙互閰嶇疆澶氫釜 Topic
锛屽畠浠槸澶氬澶氱殑鍏崇郴銆?/p>Topic
娑堟伅閲忓緢澶э紝搴旇缁欏畠澶氶厤缃嚑涓槦鍒?涓婃枃涓彁鍒颁簡鎻愰珮骞跺彂鑳藉姏)锛屽苟涓?nbsp;灏介噺澶氬垎甯冨湪涓嶅悓 Broker
涓婏紝浠ュ噺杞绘煇涓?nbsp;Broker
鐨勫帇鍔?/strong> 銆?/p>Topic
娑堟伅閲忛兘姣旇緝鍧囧寑鐨勬儏鍐典笅锛屽鏋滄煇涓?nbsp;broker
涓婄殑闃熷垪瓒婂锛屽垯璇?nbsp;broker
鍘嬪姏瓒婂ぇ銆?/p>
NameServer
锛氫笉鐭ラ亾浣犱滑鏈夋病鏈夋帴瑙﹁繃 ZooKeeper
鍜?nbsp;Spring Cloud
涓殑 Eureka
锛屽畠鍏跺疄涔熸槸涓€涓?nbsp;娉ㄥ唽涓績 锛屼富瑕佹彁渚涗袱涓姛鑳斤細Broker绠$悊 鍜?nbsp;璺敱淇℃伅绠$悊 銆傝鐧戒簡灏辨槸 Broker
浼氬皢鑷繁鐨勪俊鎭敞鍐屽埌 NameServer
涓紝姝ゆ椂 NameServer
灏卞瓨鏀句簡寰堝 Broker
鐨勪俊鎭?Broker鐨勮矾鐢辫〃)锛屾秷璐硅€呭拰鐢熶骇鑰呭氨浠?nbsp;NameServer
涓幏鍙栬矾鐢辫〃鐒跺悗鐓х潃璺敱琛ㄧ殑淇℃伅鍜屽搴旂殑 Broker
杩涜閫氫俊(鐢熶骇鑰呭拰娑堣垂鑰呭畾鏈熶細鍚?nbsp;NameServer
鍘绘煡璇㈢浉鍏崇殑 Broker
鐨勪俊鎭?銆?/p>Producer
锛氭秷鎭彂甯冪殑瑙掕壊锛屾敮鎸佸垎甯冨紡闆嗙兢鏂瑰紡閮ㄧ讲銆傝鐧戒簡灏辨槸鐢熶骇鑰呫€?/p>Consumer
锛氭秷鎭秷璐圭殑瑙掕壊锛屾敮鎸佸垎甯冨紡闆嗙兢鏂瑰紡閮ㄧ讲銆傛敮鎸佷互push鎺紝pull鎷変袱绉嶆ā寮忓娑堟伅杩涜娑堣垂銆傚悓鏃朵篃鏀寔闆嗙兢鏂瑰紡鍜屽箍鎾柟寮忕殑娑堣垂锛屽畠鎻愪緵瀹炴椂娑堟伅璁㈤槄鏈哄埗銆傝鐧戒簡灏辨槸娑堣垂鑰呫€?/p>NameServer
骞插暐鐢ㄧ殑锛岃繖涓嶅浣欏悧锛熺洿鎺?nbsp;Producer
銆?code class="mq-305">Consumer 鍜?nbsp;Broker
鐩存帴杩涜鐢熶骇娑堟伅锛屾秷璐规秷鎭笉灏卞ソ浜嗕箞锛?/p>
Broker
鏄渶瑕佷繚璇侀珮鍙敤鐨勶紝濡傛灉鏁翠釜绯荤粺浠呬粎闈犵潃涓€涓?nbsp;Broker
鏉ョ淮鎸佺殑璇濓紝閭d箞杩欎釜 Broker
鐨勫帇鍔涗細涓嶄細寰堝ぇ锛熸墍浠ユ垜浠渶瑕佷娇鐢ㄥ涓?nbsp;Broker
鏉ヤ繚璇?nbsp;璐熻浇鍧囪 銆?/p>
Broker
鐩歌繛锛岄偅涔堝綋 Broker
淇敼鐨勬椂鍊欏繀瀹氫細鐗佃繛鐫€姣忎釜鐢熶骇鑰呭拰娑堣垂鑰咃紝杩欐牱灏变細浜х敓鑰﹀悎闂锛岃€?nbsp;NameServer
娉ㄥ唽涓績灏辨槸鐢ㄦ潵瑙e喅杩欎釜闂鐨勩€?/p>
Spring Cloud
鐨勯偅绡囨枃绔狅紝鍏朵腑浠嬬粛浜?nbsp;Eureka
娉ㄥ唽涓績銆?/p>
Broker
鍋氫簡闆嗙兢骞朵笖杩樿繘琛屼簡涓讳粠閮ㄧ讲 锛岀敱浜庢秷鎭垎甯冨湪鍚勪釜 Broker
涓婏紝涓€鏃︽煇涓?nbsp;Broker
瀹曟満锛屽垯璇?code class="mq-331">Broker 涓婄殑娑堟伅璇诲啓閮戒細鍙楀埌褰卞搷銆傛墍浠?nbsp;Rocketmq
鎻愪緵浜?nbsp;master/slave
鐨勭粨鏋勶紝salve
瀹氭椂浠?nbsp;master
鍚屾鏁版嵁(鍚屾鍒风洏鎴栬€呭紓姝ュ埛鐩?锛屽鏋?nbsp;master
瀹曟満锛?span class="mq-337">鍒?nbsp;slave
鎻愪緵娑堣垂鏈嶅姟锛屼絾鏄笉鑳藉啓鍏ユ秷鎭?/strong> (鍚庨潰鎴戣繕浼氭彁鍒板摝)銆?/p>
HA
锛屾垜浠殑 NameServer
涔熷仛浜嗛泦缇ら儴缃诧紝浣嗘槸璇锋敞鎰忓畠鏄?nbsp;鍘讳腑蹇冨寲 鐨勩€備篃灏辨剰鍛崇潃瀹冩病鏈変富鑺傜偣锛屼綘鍙互寰堟槑鏄惧湴鐪嬪嚭 NameServer
鐨勬墍鏈夎妭鐐规槸娌℃湁杩涜 Info Replicate
鐨勶紝鍦?nbsp;RocketMQ
涓槸閫氳繃 鍗曚釜Broker鍜屾墍鏈塏ameServer淇濇寔闀胯繛鎺?/strong> 锛屽苟涓斿湪姣忛殧30绉?nbsp;Broker
浼氬悜鎵€鏈?nbsp;Nameserver
鍙戦€佸績璺筹紝蹇冭烦鍖呭惈浜嗚嚜韬殑 Topic
閰嶇疆淇℃伅锛岃繖涓楠ゅ氨瀵瑰簲杩欎笂闈㈢殑 Routing Info
銆?/p>
Broker
鍙戦€佹秷鎭殑鏃跺€欙紝闇€瑕佸厛浠?nbsp;NameServer
鑾峰彇鍏充簬 Broker
鐨勮矾鐢变俊鎭?/strong>锛岀劧鍚庨€氳繃 杞 鐨勬柟娉曞幓鍚戞瘡涓槦鍒椾腑鐢熶骇鏁版嵁浠ヨ揪鍒?nbsp;璐熻浇鍧囪 鐨勬晥鏋溿€?/p>
NameServer
鑾峰彇鎵€鏈?nbsp;Broker
鐨勮矾鐢变俊鎭悗锛屽悜 Broker
鍙戦€?nbsp;Pull
璇锋眰鏉ヨ幏鍙栨秷鎭暟鎹€?code class="mq-363">Consumer 鍙互浠ヤ袱绉嶆ā寮忓惎鍔ㄢ€斺€?nbsp;骞挎挱锛圔roadcast锛夊拰闆嗙兢锛圕luster锛?/strong>銆傚箍鎾ā寮忎笅锛屼竴鏉℃秷鎭細鍙戦€佺粰 鍚屼竴涓秷璐圭粍涓殑鎵€鏈夋秷璐硅€?/strong> 锛岄泦缇ゆā寮忎笅娑堟伅鍙細鍙戦€佺粰涓€涓秷璐硅€呫€?/p>
濡備綍瑙e喅 椤哄簭娑堣垂銆侀噸澶嶆秷璐?/span>
RocketMQ
锛岃€屾槸搴旇姣忎釜娑堟伅涓棿浠堕兘闇€瑕佸幓瑙e喅鐨勩€?/p>
RocketMQ
鐨勬妧鏈灦鏋勭殑鏃跺€欐垜宸茬粡鍚戜綘灞曠ず浜?nbsp;瀹冩槸濡備綍淇濊瘉楂樺彲鐢ㄧ殑 锛岃繖閲屼笉娑夊強杩愮淮鏂归潰鐨勬惌寤猴紝濡傛灉浣犳劅鍏磋叮鍙互鑷繁鍘诲畼缃戜笂鐓х潃渚嬪瓙鎼缓灞炰簬浣犺嚜宸辩殑 RocketMQ
闆嗙兢銆?/p>
Kafka
鐨勬灦鏋勫熀鏈拰 RocketMQ
绫讳技锛屽彧鏄畠娉ㄥ唽涓績浣跨敤浜?nbsp;Zookeeper
銆佸畠鐨?nbsp;鍒嗗尯 灏辩浉褰撲簬 RocketMQ
涓殑 闃熷垪 銆傝繕鏈変竴浜涘皬缁嗚妭涓嶅悓浼氬湪鍚庨潰鎻愬埌銆?/p>
椤哄簭娑堣垂
RocketMQ
鍦ㄤ富棰樹笂鏄棤搴忕殑銆佸畠鍙湁鍦ㄩ槦鍒楀眰闈㈡墠鏄繚璇佹湁搴?/strong> 鐨勩€?/p>
Broker
閲嶅惎鎯呭喌涓嬩笉浼氫繚璇佹秷鎭『搴忔€?/strong> (鐭殏鏃堕棿) 銆?/p>
binlog
鍚屾銆?/p>
MQ
閮芥槸鑳藉蹇嶇煭鏆傜殑涔卞簭锛屾墍浠ユ帹鑽愪娇鐢ㄦ櫘閫氶『搴忔ā寮忋€?/p>
Producer
鐢熶骇娑堟伅鐨勬椂鍊欎細杩涜杞(鍙栧喅浣犵殑璐熻浇鍧囪 绛栫暐)鏉ュ悜鍚屼竴涓婚鐨勪笉鍚屾秷鎭槦鍒楀彂閫佹秷鎭€傞偅涔堝鏋滄鏃舵垜鏈夊嚑涓秷鎭垎鍒槸鍚屼竴涓鍗曠殑鍒涘缓銆佹敮浠樸€佸彂璐э紝鍦ㄨ疆璇㈢殑绛栫暐涓嬭繖 涓変釜娑堟伅浼氳鍙戦€佸埌涓嶅悓闃熷垪 锛屽洜涓哄湪涓嶅悓鐨勯槦鍒楁鏃跺氨鏃犳硶浣跨敤 RocketMQ
甯︽潵鐨勯槦鍒楁湁搴忕壒鎬ф潵淇濊瘉娑堟伅鏈夊簭鎬т簡銆?/p>
閲嶅娑堣垂
Redis
鏉ヤ繚璇侊紝鍥犱负 Redis
鐨?nbsp;key
鍜?nbsp;value
灏辨槸澶╃劧鏀寔骞傜瓑鐨勩€傚綋鐒惰繕鏈変娇鐢?nbsp;鏁版嵁搴撴彃鍏ユ硶 锛屽熀浜庢暟鎹簱鐨勫敮涓€閿潵淇濊瘉閲嶅鏁版嵁涓嶄細琚彃鍏ュ鏉°€?/p>
RPC
妗嗘灦鑷姩閲嶈瘯瀵艰嚧鐨?nbsp;閲嶅璋冪敤闂 銆?/p>
鍒嗗竷寮忎簨鍔?/span>
RocketMQ
涓娇鐢ㄧ殑鏄?nbsp;浜嬪姟娑堟伅鍔犱笂浜嬪姟鍙嶆煡鏈哄埗 鏉ヨВ鍐冲垎甯冨紡浜嬪姟闂鐨勩€傛垜鐢讳簡寮犲浘锛屽ぇ瀹跺彲浠ュ鐓х潃鍥捐繘琛岀悊瑙c€?/p>
RocketMQ
涓氨鏄娇鐢ㄧ殑涓婅堪鐨勪簨鍔″弽鏌ユ潵瑙e喅鐨勶紝鑰屽湪 Kafka
涓€氬父鏄洿鎺ユ姏鍑轰竴涓紓甯歌鐢ㄦ埛鏉ヨ嚜琛岃В鍐炽€?/p>
MQ Server
鎸囧悜绯荤粺B鐨勬搷浣滃凡缁忓拰绯荤粺A涓嶇浉鍏充簡锛屼篃灏辨槸璇村湪娑堟伅闃熷垪涓殑鍒嗗竷寮忎簨鍔℃槸鈥斺€?span class="mq-458">鏈湴浜嬪姟鍜屽瓨鍌ㄦ秷鎭埌娑堟伅闃熷垪鎵嶆槸鍚屼竴涓簨鍔?/strong>銆傝繖鏍蜂篃灏变骇鐢熶簡浜嬪姟鐨?span class="mq-459">鏈€缁堜竴鑷存€?/strong>锛屽洜涓烘暣涓繃绋嬫槸寮傛鐨勶紝姣忎釜绯荤粺鍙淇濊瘉瀹冭嚜宸遍偅涓€閮ㄥ垎鐨勪簨鍔″氨琛屼簡銆?/p>
娑堟伅鍫嗙Н闂
RocketMQ
涓紝涓€涓槦鍒楀彧浼氳涓€涓秷璐硅€呮秷璐?/strong> 锛屽鏋滀綘浠呬粎鏄鍔犳秷璐硅€呭疄渚嬪氨浼氬嚭鐜版垜涓€寮€濮嬬粰浣犵敾鏋舵瀯鍥剧殑閭g鎯呭喌銆?/p>
鍥炴函娑堣垂
Consumer
宸茬粡娑堣垂鎴愬姛鐨勬秷鎭紝鐢变簬涓氬姟涓婇渶姹傞渶瑕侀噸鏂版秷璐癸紝鍦?code class="mq-481">RocketMQ 涓紝 Broker
鍦ㄥ悜Consumer
鎶曢€掓垚鍔熸秷鎭悗锛?span class="mq-484">娑堟伅浠嶇劧闇€瑕佷繚鐣?/strong> 銆傚苟涓旈噸鏂版秷璐逛竴鑸槸鎸夌収鏃堕棿缁村害锛屼緥濡傜敱浜?nbsp;Consumer
绯荤粺鏁呴殰锛屾仮澶嶅悗闇€瑕侀噸鏂版秷璐?灏忔椂鍓嶇殑鏁版嵁锛岄偅涔?nbsp;Broker
瑕佹彁渚涗竴绉嶆満鍒讹紝鍙互鎸夌収鏃堕棿缁村害鏉ュ洖閫€娑堣垂杩涘害銆?code class="mq-487">RocketMQ 鏀寔鎸夌収鏃堕棿鍥炴函娑堣垂锛屾椂闂寸淮搴︾簿纭埌姣銆?/p>
RocketMQ 鐨勫埛鐩樻満鍒?/span>
RocketMQ
鐨勬灦鏋勫拰璁捐鍘熺悊锛屼綘鏈夋病鏈夊ソ濂?/p>
Topic
涓殑 闃熷垪鏄互浠€涔堟牱鐨勫舰寮忓瓨鍦ㄧ殑锛?/strong>鍚屾鍒风洏鍜屽紓姝ュ埛鐩?/span>
ACK
锛屽悓姝ュ埛鐩樺 MQ
娑堟伅鍙潬鎬ф潵璇存槸涓€绉嶄笉閿欑殑淇濋殰锛屼絾鏄?nbsp;鎬ц兘涓婁細鏈夎緝澶у奖鍝?/strong> 锛屼竴鑸湴閫傜敤浜庨噾铻嶇瓑鐗瑰畾涓氬姟鍦烘櫙銆?/p>
MQ
鐨勬€ц兘鍜屽悶鍚愰噺锛屼竴鑸€傜敤浜庡鍙戦獙璇佺爜绛夊浜庢秷鎭繚璇佽姹備笉澶珮鐨勪笟鍔″満鏅€?/p>
Broker
鎰忓瀹曟満鐨勬椂鍊欎細涓㈠け閮ㄥ垎鏁版嵁锛屼綘鍙互璁剧疆 Broker
鐨勫弬鏁?nbsp;FlushDiskType
鏉ヨ皟鏁翠綘鐨勫埛鐩樼瓥鐣?ASYNC_FLUSH 鎴栬€?SYNC_FLUSH)銆?/p>
鍚屾澶嶅埗鍜屽紓姝ュ鍒?/span>
Borker
涓讳粠妯″紡涓嬶紝涓昏妭鐐硅繑鍥炴秷鎭粰瀹㈡埛绔殑鏃跺€欐槸鍚﹂渶瑕佸悓姝ヤ粠鑺傜偣銆?/p>
RocketMQ
鏄笉鏀寔鑷姩涓讳粠鍒囨崲鐨勶紝褰撲富鑺傜偣鎸傛帀涔嬪悗锛岀敓浜ц€呭氨涓嶈兘鍐嶇粰杩欎釜涓昏妭鐐圭敓浜ф秷鎭簡銆?/p>
Topic
鏄垎甯冨湪涓嶅悓 Broker
涓殑銆?/p>
Topic
涓嬬殑闃熷垪鏉ヤ繚璇侀『搴忔€х殑銆傚鏋滄鏃舵垜浠富鑺傜偣A璐熻矗鐨勬槸璁㈠崟A鐨勪竴绯诲垪璇箟娑堟伅锛岀劧鍚庡畠鎸備簡锛岃繖鏍峰叾浠栬妭鐐规槸鏃犳硶浠f浛涓昏妭鐐笰鐨勶紝濡傛灉鎴戜滑浠绘剰鑺傜偣閮藉彲浠ュ瓨鍏ヤ换浣曟秷鎭紝閭e氨娌℃湁椤哄簭鎬у彲瑷€浜嗐€?/p>
RocketMQ
涓噰鐢ㄤ簡 Dledger
瑙e喅杩欎釜闂銆備粬瑕佹眰鍦ㄥ啓鍏ユ秷鎭殑鏃跺€欙紝瑕佹眰鑷冲皯娑堟伅澶嶅埗鍒板崐鏁颁互涓婄殑鑺傜偣涔嬪悗锛屾墠缁欏饧剧杩斿洖鍐欌紛鎴愬姛锛屽苟涓斿畠鏄絸鎸侀€氳繃閫変妇鏉ュ姩鎬佸垏鎹富鑺傜偣鐨勩€傝繖閲屾垜灏变笉灞曞紑璇存槑浜嗭紝璇昏€呭彲浠ヨ嚜宸卞幓浜嗚В銆?/p>
Dledger
鏄釜瀹岀編鐨勬柟妗堬紝鑷冲皯鍦?nbsp;Dledger
閫変妇杩囩▼涓槸鏃犳硶鎻愪緵鏈嶅姟鐨勶紝鑰屼笖浠栧繀椤昏浣跨敤涓変釜鑺傜偣鎴栦互涓婏紝濡傛灉澶氭暟鑺傜偣鍚屾椂鎸傛帀浠栦篃鏄棤娉曚繚璇佸彲鐢ㄦ€х殑锛岃€屼笖瑕佹眰娑堟伅澶嶅埗鏉夸功浠ヤ笂鑺傜偣鐨勬晥鐜囧拰鐩存帴寮傛澶嶅埗杩樻槸鏈変竴瀹氱殑宸窛鐨勩€?/p>
瀛樺偍鏈哄埗
Topic
涓殑 闃熷垪鏄互浠€涔堟牱鐨勫舰寮忓瓨鍦ㄧ殑锛熼槦鍒椾腑鐨勬秷鎭張鏄浣曡繘琛屽瓨鍌ㄦ寔涔呭寲鐨勫憿锛?/strong> 杩樻湭瑙e喅锛屽叾瀹炶繖閲屾秹鍙婂埌浜?nbsp;RocketMQ
鏄浣曡璁″畠鐨勫瓨鍌ㄧ粨鏋勪簡銆傛垜棣栧厛鎯冲ぇ瀹朵粙缁?nbsp;RocketMQ
娑堟伅瀛樺偍鏋舵瀯涓殑涓夊ぇ瑙掕壊鈥斺€?code class="mq-559">CommitLog 銆?code class="mq-560">ConsumeQueue 鍜?nbsp;IndexFile
銆?/p>
CommitLog
锛?nbsp;娑堟伅涓讳綋浠ュ強鍏冩暟鎹殑瀛樺偍涓讳綋锛屽瓨鍌?nbsp;Producer
绔啓鍏ョ殑娑堟伅涓讳綋鍐呭,娑堟伅鍐呭涓嶆槸瀹氶暱鐨勩€傚崟涓枃浠跺ぇ灏忛粯璁?G 锛屾枃浠跺悕闀垮害涓?0浣嶏紝宸﹁竟琛ラ浂锛屽墿浣欎负璧峰鍋忕Щ閲忥紝姣斿00000000000000000000浠h〃浜嗙涓€涓枃浠讹紝璧峰鍋忕Щ閲忎负0锛屾枃浠跺ぇ灏忎负1G=1073741824锛涘綋绗竴涓枃浠跺啓婊′簡锛岀浜屼釜鏂囦欢涓?0000000001073741824锛岃捣濮嬪亸绉婚噺涓?073741824锛屼互姝ょ被鎺ㄣ€傛秷鎭富瑕佹槸椤哄簭鍐欏叆鏃ュ織鏂囦欢锛屽綋鏂囦欢婊′簡锛屽啓鍏ヤ笅涓€涓枃浠躲€?/p>ConsumeQueue
锛氭秷鎭秷璐归槦鍒楋紝寮曞叆鐨勭洰鐨勪富瑕佹槸鎻愰珮娑堟伅娑堣垂鐨勬€ц兘(鎴戜滑鍐嶅墠闈篃璁蹭簡)锛岀敱浜?code class="mq-569">RocketMQ 鏄熀浜庝富棰?nbsp;Topic
鐨勮闃呮ā寮忥紝娑堟伅娑堣垂鏄拡瀵逛富棰樿繘琛岀殑锛屽鏋滆閬嶅巻 commitlog
鏂囦欢涓牴鎹?nbsp;Topic
妫€绱㈡秷鎭槸闈炲父浣庢晥鐨勩€?code class="mq-573">Consumer 鍗冲彲鏍规嵁 ConsumeQueue
鏉ユ煡鎵惧緟娑堣垂鐨勬秷鎭€傚叾涓紝ConsumeQueue
锛堥€昏緫娑堣垂闃熷垪锛?span class="mq-576">浣滀负娑堣垂娑堟伅鐨勭储寮?/strong>锛屼繚瀛樹簡鎸囧畾 Topic
涓嬬殑闃熷垪娑堟伅鍦?nbsp;CommitLog
涓殑**璧峰鐗╃悊鍋忕Щ閲?nbsp;offset
**锛屾秷鎭ぇ灏?nbsp;size
鍜屾秷鎭?nbsp;Tag
鐨?nbsp;HashCode
鍊笺€?span class="mq-583">`consumequeue` 鏂囦欢鍙互鐪嬫垚鏄熀浜?`topic` 鐨?`commitlog` 绱㈠紩鏂囦欢锛屾晠 consumequeue
鏂囦欢澶圭殑缁勭粐鏂瑰紡濡備笅锛歵opic/queue/file涓夊眰缁勭粐缁撴瀯锛屽叿浣撳瓨鍌ㄨ矾寰勪负锛?HOME/store/consumequeue/{topic}/{queueId}/{fileName}銆傚悓鏍?nbsp;consumequeue
鏂囦欢閲囧彇瀹氶暱璁捐锛屾瘡涓€涓潯鐩叡20涓瓧鑺傦紝鍒嗗埆涓?瀛楄妭鐨?nbsp;commitlog
鐗╃悊鍋忕Щ閲忋€?瀛楄妭鐨勬秷鎭暱搴︺€?瀛楄妭tag hashcode
锛屽崟涓枃浠剁敱30W涓潯鐩粍鎴愶紝鍙互鍍忔暟缁勪竴鏍烽殢鏈鸿闂瘡涓€涓潯鐩紝姣忎釜 ConsumeQueue
鏂囦欢澶у皬绾?.72M锛?/p>IndexFile
锛?nbsp;IndexFile
锛堢储寮曟枃浠讹級鎻愪緵浜嗕竴绉嶅彲浠ラ€氳繃key鎴栨椂闂村尯闂存潵鏌ヨ娑堟伅鐨勬柟娉曘€傝繖閲屽彧鍋氱鏅笉鍋氳缁嗕粙缁嶃€?/p>CommitLoq
鍜?nbsp;ConsumeQueue
銆傝€?nbsp;ConsumeQueue
浣犲彲浠ュぇ姒傜悊瑙d负 Topic
涓殑闃熷垪銆?/p>
RocketMQ
閲囩敤鐨勬槸 娣峰悎鍨嬬殑瀛樺偍缁撴瀯 锛屽嵆涓?nbsp;Broker
鍗曚釜瀹炰緥涓嬫墍鏈夌殑闃熷垪鍏辩敤涓€涓棩蹇楁暟鎹枃浠舵潵瀛樺偍娑堟伅銆傛湁鎰忔€濈殑鏄湪鍚屾牱楂樺苟鍙戠殑 Kafka
涓細涓烘瘡涓?nbsp;Topic
鍒嗛厤涓€涓瓨鍌ㄦ枃浠躲€傝繖灏辨湁鐐圭被浼间簬鎴戜滑鏈変竴澶у爢涔﹂渶瑕佽涓婁功鏋讹紝RockeMQ
鏄笉鍒嗕功鐨勭绫荤洿鎺ユ垚鎵圭殑濉炰笂鍘荤殑锛岃€?nbsp;Kafka
鏄皢涔︽湰鏀惧叆鎸囧畾鐨勫垎绫诲尯鍩熺殑銆?/p>
RocketMQ
涓轰粈涔堣杩欎箞鍋氬憿锛熷師鍥犳槸 鎻愰珮鏁版嵁鐨勫啓鍏ユ晥鐜?/strong> 锛屼笉鍒?nbsp;Topic
鎰忓懗鐫€鎴戜滑鏈夋洿澶х殑鍑犵巼鑾峰彇 鎴愭壒 鐨勬秷鎭繘琛屾暟鎹啓鍏ワ紝浣嗕篃浼氬甫鏉ヤ竴涓夯鐑﹀氨鏄鍙栨秷鎭殑鏃跺€欓渶瑕侀亶鍘嗘暣涓ぇ鏂囦欢锛岃繖鏄潪甯歌€楁椂鐨勩€?/p>
RocketMQ
涓張浣跨敤浜?nbsp;ConsumeQueue
浣滀负姣忎釜闃熷垪鐨勭储寮曟枃浠舵潵 鎻愬崌璇诲彇娑堟伅鐨勬晥鐜?/strong>銆傛垜浠彲浠ョ洿鎺ユ牴鎹槦鍒楃殑娑堟伅搴忓彿锛岃绠楀嚭绱㈠紩鐨勫叏灞€浣嶇疆锛堢储寮曞簭鍙?绱㈠紩鍥哄畾饣撳害20锛夛紝鐒跺悗鐩存帴璇诲彇杩欐潯绱㈠紩锛屽啀鏍规嵁绱㈠紩涓褰曠殑娑堟伅鐨勫叏灞€浣嶇疆锛屾壘鍒版秷鎭€?/p>
RockeMQ
鐨勫瓨鍌ㄦ灦鏋勮繕鏈変簺妯$硦锛屾病浜嬶紝鎴戜滑缁撳悎鐫€鍥炬潵鐞嗚В涓€涓嬨€?/p>
ConsumerQueue
鐞嗚В涓?nbsp;Queue
銆?/p>
Topic
銆?code class="mq-629">QueueId 鍜屽叿浣撴秷鎭唴瀹癸紝鑰屽湪 Broker
涓浣犳槸鍝棬瀛愭秷鎭紝浠栫洿鎺?**鍏ㄩ儴椤哄簭瀛樺偍鍒颁簡 CommitLog **銆傝€屾牴鎹敓浜ц€呮寚瀹氱殑 Topic
鍜?nbsp;QueueId
灏嗚繖鏉℃秷鎭湰韬湪 CommitLog
鐨勫亸绉?offset)锛屾秷鎭湰韬ぇ灏忥紝鍜宼ag鐨刪ash鍊煎瓨鍏ュ搴旂殑 ConsumeQueue
绱㈠紩鏂囦欢涓€傝€屽湪姣忎釜闃熷垪涓兘淇濆瓨浜?nbsp;ConsumeOffset
鍗虫瘡涓秷璐硅€呯粍鐨勬秷璐逛綅缃?鎴戝湪鏋舵瀯閭i噷鎻愬埌浜嗭紝蹇樹簡鐨勫悓瀛﹀彲浠ュ洖鍘荤湅涓€涓?锛岃€屾秷璐硅€呮媺鍙栨秷鎭繘琛屾秷璐圭殑鏃跺€欏彧闇€瑕佹牴鎹?nbsp;ConsumeOffset
鑾峰彇涓嬩竴涓湭琚秷璐圭殑娑堟伅灏辫浜嗐€?/p>
CommitLog
鏂囦欢瑕佽璁℃垚鍥哄畾澶у皬鐨勯暱搴﹀憿锛熸彁閱掞細鍐呭瓨鏄犲皠鏈哄埗銆?/p>
鎬荤粨
RocketMQ
鐨勬妧鏈灦鏋?NameServer
銆?code class="mq-654">Broker 銆?code class="mq-655">Producer 銆?code class="mq-656">Comsumer)RocketMQ
鍥炵瓟浜嗘秷鎭槦鍒楀壇浣滅敤鐨勮В鍐虫柟妗?/p>RocketMQ
鐨勫瓨鍌ㄦ満鍒跺拰鍒风洏绛栫暐銆?/p>
鏂囩珷鎺ㄨ崘