blob: 760fc2952cd71697e5632bb0bb7c5ee8b541f3b2 [file] [log] [blame]
"use strict";(self.webpackChunkrocketmq_docs=self.webpackChunkrocketmq_docs||[]).push([[9795],{15680:(e,n,a)=>{a.d(n,{xA:()=>c,yg:()=>u});var t=a(96540);function r(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function l(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function p(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?l(Object(a),!0).forEach((function(n){r(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function i(e,n){if(null==e)return{};var a,t,r=function(e,n){if(null==e)return{};var a,t,r={},l=Object.keys(e);for(t=0;t<l.length;t++)a=l[t],n.indexOf(a)>=0||(r[a]=e[a]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t<l.length;t++)a=l[t],n.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=t.createContext({}),g=function(e){var n=t.useContext(o),a=n;return e&&(a="function"==typeof e?e(n):p(p({},n),e)),a},c=function(e){var n=g(e.components);return t.createElement(o.Provider,{value:n},e.children)},s="mdxType",y={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},m=t.forwardRef((function(e,n){var a=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),s=g(a),m=r,u=s["".concat(o,".").concat(m)]||s[m]||y[m]||l;return a?t.createElement(u,p(p({ref:n},c),{},{components:a})):t.createElement(u,p({ref:n},c))}));function u(e,n){var a=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var l=a.length,p=new Array(l);p[0]=m;var i={};for(var o in n)hasOwnProperty.call(n,o)&&(i[o]=n[o]);i.originalType=e,i[s]="string"==typeof e?e:r,p[1]=i;for(var g=2;g<l;g++)p[g]=a[g];return t.createElement.apply(null,p)}return t.createElement.apply(null,a)}m.displayName="MDXCreateElement"},65434:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>o,contentTitle:()=>p,default:()=>y,frontMatter:()=>l,metadata:()=>i,toc:()=>g});var t=a(58168),r=(a(96540),a(15680));const l={},p="\u4e8b\u52a1\u6d88\u606f",i={unversionedId:"featureBehavior/04transactionmessage",id:"version-5.0/featureBehavior/04transactionmessage",title:"\u4e8b\u52a1\u6d88\u606f",description:"\u4e8b\u52a1\u6d88\u606f\u4e3a Apache RocketMQ \u4e2d\u7684\u9ad8\u7ea7\u7279\u6027\u6d88\u606f\uff0c\u672c\u6587\u4e3a\u60a8\u4ecb\u7ecd\u4e8b\u52a1\u6d88\u606f\u7684\u5e94\u7528\u573a\u666f\u3001\u529f\u80fd\u539f\u7406\u3001\u4f7f\u7528\u9650\u5236\u3001\u4f7f\u7528\u65b9\u6cd5\u548c\u4f7f\u7528\u5efa\u8bae\u3002",source:"@site/versioned_docs/version-5.0/04-featureBehavior/04transactionmessage.md",sourceDirName:"04-featureBehavior",slug:"/featureBehavior/04transactionmessage",permalink:"/zh/docs/featureBehavior/04transactionmessage",draft:!1,editUrl:"https://github.com/apache/rocketmq-site/tree/new-official-website/versioned_docs/version-5.0/04-featureBehavior/04transactionmessage.md",tags:[],version:"5.0",frontMatter:{},sidebar:"version-5.0/myAutogeneratedSidebar",previous:{title:"\u987a\u5e8f\u6d88\u606f",permalink:"/zh/docs/featureBehavior/03fifomessage"},next:{title:"\u6d88\u606f\u53d1\u9001\u91cd\u8bd5\u548c\u6d41\u63a7\u673a\u5236",permalink:"/zh/docs/featureBehavior/05sendretrypolicy"}},o={},g=[{value:"\u5e94\u7528\u573a\u666f",id:"\u5e94\u7528\u573a\u666f",level:2},{value:"\u529f\u80fd\u539f\u7406",id:"\u529f\u80fd\u539f\u7406",level:2},{value:"\u4f7f\u7528\u9650\u5236",id:"\u4f7f\u7528\u9650\u5236",level:2},{value:"\u4f7f\u7528\u793a\u4f8b",id:"\u4f7f\u7528\u793a\u4f8b",level:2},{value:"\u4f7f\u7528\u5efa\u8bae",id:"\u4f7f\u7528\u5efa\u8bae",level:2}],c={toc:g},s="wrapper";function y(e){let{components:n,...l}=e;return(0,r.yg)(s,(0,t.A)({},c,l,{components:n,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"\u4e8b\u52a1\u6d88\u606f"},"\u4e8b\u52a1\u6d88\u606f"),(0,r.yg)("p",null,"\u4e8b\u52a1\u6d88\u606f\u4e3a Apache RocketMQ \u4e2d\u7684\u9ad8\u7ea7\u7279\u6027\u6d88\u606f\uff0c\u672c\u6587\u4e3a\u60a8\u4ecb\u7ecd\u4e8b\u52a1\u6d88\u606f\u7684\u5e94\u7528\u573a\u666f\u3001\u529f\u80fd\u539f\u7406\u3001\u4f7f\u7528\u9650\u5236\u3001\u4f7f\u7528\u65b9\u6cd5\u548c\u4f7f\u7528\u5efa\u8bae\u3002"),(0,r.yg)("h2",{id:"\u5e94\u7528\u573a\u666f"},"\u5e94\u7528\u573a\u666f"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u5206\u5e03\u5f0f\u4e8b\u52a1\u7684\u8bc9\u6c42")),(0,r.yg)("p",null,"\u5206\u5e03\u5f0f\u7cfb\u7edf\u8c03\u7528\u7684\u7279\u70b9\u4e3a\u4e00\u4e2a\u6838\u5fc3\u4e1a\u52a1\u903b\u8f91\u7684\u6267\u884c\uff0c\u540c\u65f6\u9700\u8981\u8c03\u7528\u591a\u4e2a\u4e0b\u6e38\u4e1a\u52a1\u8fdb\u884c\u5904\u7406\u3002\u56e0\u6b64\uff0c\u5982\u4f55\u4fdd\u8bc1\u6838\u5fc3\u4e1a\u52a1\u548c\u591a\u4e2a\u4e0b\u6e38\u4e1a\u52a1\u7684\u6267\u884c\u7ed3\u679c\u5b8c\u5168\u4e00\u81f4\uff0c\u662f\u5206\u5e03\u5f0f\u4e8b\u52a1\u9700\u8981\u89e3\u51b3\u7684\u4e3b\u8981\u95ee\u9898\u3002\n",(0,r.yg)("img",{alt:"\u4e8b\u52a1\u6d88\u606f\u8bc9\u6c42",src:a(29762).A,width:"871",height:"400"})),(0,r.yg)("p",null,"\u4ee5\u7535\u5546\u4ea4\u6613\u573a\u666f\u4e3a\u4f8b\uff0c\u7528\u6237\u652f\u4ed8\u8ba2\u5355\u8fd9\u4e00\u6838\u5fc3\u64cd\u4f5c\u7684\u540c\u65f6\u4f1a\u6d89\u53ca\u5230\u4e0b\u6e38\u7269\u6d41\u53d1\u8d27\u3001\u79ef\u5206\u53d8\u66f4\u3001\u8d2d\u7269\u8f66\u72b6\u6001\u6e05\u7a7a\u7b49\u591a\u4e2a\u5b50\u7cfb\u7edf\u7684\u53d8\u66f4\u3002\u5f53\u524d\u4e1a\u52a1\u7684\u5904\u7406\u5206\u652f\u5305\u62ec\uff1a"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u4e3b\u5206\u652f\u8ba2\u5355\u7cfb\u7edf\u72b6\u6001\u66f4\u65b0\uff1a\u7531\u672a\u652f\u4ed8\u53d8\u66f4\u4e3a\u652f\u4ed8\u6210\u529f\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u7269\u6d41\u7cfb\u7edf\u72b6\u6001\u65b0\u589e\uff1a\u65b0\u589e\u5f85\u53d1\u8d27\u7269\u6d41\u8bb0\u5f55\uff0c\u521b\u5efa\u8ba2\u5355\u7269\u6d41\u8bb0\u5f55\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u79ef\u5206\u7cfb\u7edf\u72b6\u6001\u53d8\u66f4\uff1a\u53d8\u66f4\u7528\u6237\u79ef\u5206\uff0c\u66f4\u65b0\u7528\u6237\u79ef\u5206\u8868\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u8d2d\u7269\u8f66\u7cfb\u7edf\u72b6\u6001\u53d8\u66f4\uff1a\u6e05\u7a7a\u8d2d\u7269\u8f66\uff0c\u66f4\u65b0\u7528\u6237\u8d2d\u7269\u8f66\u8bb0\u5f55\u3002"))),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u4f20\u7edfXA\u4e8b\u52a1\u65b9\u6848\uff1a\u6027\u80fd\u4e0d\u8db3")),(0,r.yg)("p",null,"\u4e3a\u4e86\u4fdd\u8bc1\u4e0a\u8ff0\u56db\u4e2a\u5206\u652f\u7684\u6267\u884c\u7ed3\u679c\u4e00\u81f4\u6027\uff0c\u5178\u578b\u65b9\u6848\u662f\u57fa\u4e8eXA\u534f\u8bae\u7684\u5206\u5e03\u5f0f\u4e8b\u52a1\u7cfb\u7edf\u6765\u5b9e\u73b0\u3002\u5c06\u56db\u4e2a\u8c03\u7528\u5206\u652f\u5c01\u88c5\u6210\u5305\u542b\u56db\u4e2a\u72ec\u7acb\u4e8b\u52a1\u5206\u652f\u7684\u5927\u4e8b\u52a1\u3002\u57fa\u4e8eXA\u5206\u5e03\u5f0f\u4e8b\u52a1\u7684\u65b9\u6848\u53ef\u4ee5\u6ee1\u8db3\u4e1a\u52a1\u5904\u7406\u7ed3\u679c\u7684\u6b63\u786e\u6027\uff0c\u4f46\u6700\u5927\u7684\u7f3a\u70b9\u662f\u591a\u5206\u652f\u73af\u5883\u4e0b\u8d44\u6e90\u9501\u5b9a\u8303\u56f4\u5927\uff0c\u5e76\u53d1\u5ea6\u4f4e\uff0c\u968f\u7740\u4e0b\u6e38\u5206\u652f\u7684\u589e\u52a0\uff0c\u7cfb\u7edf\u6027\u80fd\u4f1a\u8d8a\u6765\u8d8a\u5dee\u3002"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u57fa\u4e8e\u666e\u901a\u6d88\u606f\u65b9\u6848\uff1a\u4e00\u81f4\u6027\u4fdd\u969c\u56f0\u96be")),(0,r.yg)("p",null,"\u5c06\u4e0a\u8ff0\u57fa\u4e8eXA\u4e8b\u52a1\u7684\u65b9\u6848\u8fdb\u884c\u7b80\u5316\uff0c\u5c06\u8ba2\u5355\u7cfb\u7edf\u53d8\u66f4\u4f5c\u4e3a\u672c\u5730\u4e8b\u52a1\uff0c\u5269\u4e0b\u7684\u7cfb\u7edf\u53d8\u66f4\u4f5c\u4e3a\u666e\u901a\u6d88\u606f\u7684\u4e0b\u6e38\u6765\u6267\u884c\uff0c\u4e8b\u52a1\u5206\u652f\u7b80\u5316\u6210\u666e\u901a\u6d88\u606f+\u8ba2\u5355\u8868\u4e8b\u52a1\uff0c\u5145\u5206\u5229\u7528\u6d88\u606f\u5f02\u6b65\u5316\u7684\u80fd\u529b\u7f29\u77ed\u94fe\u8def\uff0c\u63d0\u9ad8\u5e76\u53d1\u5ea6\u3002\n",(0,r.yg)("img",{alt:"\u666e\u901a\u6d88\u606f\u65b9\u6848",src:a(36796).A,width:"1070",height:"727"})),(0,r.yg)("p",null,"\u8be5\u65b9\u6848\u4e2d\u6d88\u606f\u4e0b\u6e38\u5206\u652f\u548c\u8ba2\u5355\u7cfb\u7edf\u53d8\u66f4\u7684\u4e3b\u5206\u652f\u5f88\u5bb9\u6613\u51fa\u73b0\u4e0d\u4e00\u81f4\u7684\u73b0\u8c61\uff0c\u4f8b\u5982\uff1a"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u6d88\u606f\u53d1\u9001\u6210\u529f\uff0c\u8ba2\u5355\u6ca1\u6709\u6267\u884c\u6210\u529f\uff0c\u9700\u8981\u56de\u6eda\u6574\u4e2a\u4e8b\u52a1\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u8ba2\u5355\u6267\u884c\u6210\u529f\uff0c\u6d88\u606f\u6ca1\u6709\u53d1\u9001\u6210\u529f\uff0c\u9700\u8981\u989d\u5916\u8865\u507f\u624d\u80fd\u53d1\u73b0\u4e0d\u4e00\u81f4\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u6d88\u606f\u53d1\u9001\u8d85\u65f6\u672a\u77e5\uff0c\u6b64\u65f6\u65e0\u6cd5\u5224\u65ad\u9700\u8981\u56de\u6eda\u8ba2\u5355\u8fd8\u662f\u63d0\u4ea4\u8ba2\u5355\u53d8\u66f4\u3002"))),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u57fa\u4e8eApache RocketMQ\u5206\u5e03\u5f0f\u4e8b\u52a1\u6d88\u606f\uff1a\u652f\u6301\u6700\u7ec8\u4e00\u81f4\u6027")),(0,r.yg)("p",null,"\u4e0a\u8ff0\u666e\u901a\u6d88\u606f\u65b9\u6848\u4e2d\uff0c\u666e\u901a\u6d88\u606f\u548c\u8ba2\u5355\u4e8b\u52a1\u65e0\u6cd5\u4fdd\u8bc1\u4e00\u81f4\u7684\u539f\u56e0\uff0c\u672c\u8d28\u4e0a\u662f\u7531\u4e8e\u666e\u901a\u6d88\u606f\u65e0\u6cd5\u50cf\u5355\u673a\u6570\u636e\u5e93\u4e8b\u52a1\u4e00\u6837\uff0c\u5177\u5907\u63d0\u4ea4\u3001\u56de\u6eda\u548c\u7edf\u4e00\u534f\u8c03\u7684\u80fd\u529b\u3002"),(0,r.yg)("p",null,"\u800c\u57fa\u4e8eApache RocketMQ\u5b9e\u73b0\u7684\u5206\u5e03\u5f0f\u4e8b\u52a1\u6d88\u606f\u529f\u80fd\uff0c\u5728\u666e\u901a\u6d88\u606f\u57fa\u7840\u4e0a\uff0c\u652f\u6301\u4e8c\u9636\u6bb5\u7684\u63d0\u4ea4\u80fd\u529b\u3002\u5c06\u4e8c\u9636\u6bb5\u63d0\u4ea4\u548c\u672c\u5730\u4e8b\u52a1\u7ed1\u5b9a\uff0c\u5b9e\u73b0\u5168\u5c40\u63d0\u4ea4\u7ed3\u679c\u7684\u4e00\u81f4\u6027\u3002\n",(0,r.yg)("img",{alt:"\u4e8b\u52a1\u6d88\u606f",src:a(4015).A,width:"1070",height:"727"})),(0,r.yg)("p",null,"Apache RocketMQ\u4e8b\u52a1\u6d88\u606f\u7684\u65b9\u6848\uff0c\u5177\u5907\u9ad8\u6027\u80fd\u3001\u53ef\u6269\u5c55\u3001\u4e1a\u52a1\u5f00\u53d1\u7b80\u5355\u7684\u4f18\u52bf\u3002\u5177\u4f53\u4e8b\u52a1\u6d88\u606f\u7684\u539f\u7406\u548c\u6d41\u7a0b\uff0c\u8bf7\u53c2\u89c1\u4e0b\u6587\u7684\u529f\u80fd\u539f\u7406\u3002"),(0,r.yg)("h2",{id:"\u529f\u80fd\u539f\u7406"},"\u529f\u80fd\u539f\u7406"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u4ec0\u4e48\u662f\u4e8b\u52a1\u6d88\u606f")),(0,r.yg)("p",null,"\u4e8b\u52a1\u6d88\u606f\u662f Apache RocketMQ \u63d0\u4f9b\u7684\u4e00\u79cd\u9ad8\u7ea7\u6d88\u606f\u7c7b\u578b\uff0c\u652f\u6301\u5728\u5206\u5e03\u5f0f\u573a\u666f\u4e0b\u4fdd\u969c\u6d88\u606f\u751f\u4ea7\u548c\u672c\u5730\u4e8b\u52a1\u7684\u6700\u7ec8\u4e00\u81f4\u6027\u3002"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u4e8b\u52a1\u6d88\u606f\u5904\u7406\u6d41\u7a0b")),(0,r.yg)("p",null,"\u4e8b\u52a1\u6d88\u606f\u4ea4\u4e92\u6d41\u7a0b\u5982\u4e0b\u56fe\u6240\u793a\u3002",(0,r.yg)("img",{alt:"\u4e8b\u52a1\u6d88\u606f",src:a(15609).A,width:"1989",height:"633"})),(0,r.yg)("ol",null,(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},"\u751f\u4ea7\u8005\u5c06\u6d88\u606f\u53d1\u9001\u81f3Apache RocketMQ\u670d\u52a1\u7aef\u3002")),(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},'Apache RocketMQ\u670d\u52a1\u7aef\u5c06\u6d88\u606f\u6301\u4e45\u5316\u6210\u529f\u4e4b\u540e\uff0c\u5411\u751f\u4ea7\u8005\u8fd4\u56deAck\u786e\u8ba4\u6d88\u606f\u5df2\u7ecf\u53d1\u9001\u6210\u529f\uff0c\u6b64\u65f6\u6d88\u606f\u88ab\u6807\u8bb0\u4e3a"\u6682\u4e0d\u80fd\u6295\u9012"\uff0c\u8fd9\u79cd\u72b6\u6001\u4e0b\u7684\u6d88\u606f\u5373\u4e3a\u534a\u4e8b\u52a1\u6d88\u606f\u3002')),(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},"\u751f\u4ea7\u8005\u5f00\u59cb\u6267\u884c\u672c\u5730\u4e8b\u52a1\u903b\u8f91\u3002")),(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},"\u751f\u4ea7\u8005\u6839\u636e\u672c\u5730\u4e8b\u52a1\u6267\u884c\u7ed3\u679c\u5411\u670d\u52a1\u7aef\u63d0\u4ea4\u4e8c\u6b21\u786e\u8ba4\u7ed3\u679c\uff08Commit\u6216\u662fRollback\uff09\uff0c\u670d\u52a1\u7aef\u6536\u5230\u786e\u8ba4\u7ed3\u679c\u540e\u5904\u7406\u903b\u8f91\u5982\u4e0b\uff1a"),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u4e8c\u6b21\u786e\u8ba4\u7ed3\u679c\u4e3aCommit\uff1a\u670d\u52a1\u7aef\u5c06\u534a\u4e8b\u52a1\u6d88\u606f\u6807\u8bb0\u4e3a\u53ef\u6295\u9012\uff0c\u5e76\u6295\u9012\u7ed9\u6d88\u8d39\u8005\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u4e8c\u6b21\u786e\u8ba4\u7ed3\u679c\u4e3aRollback\uff1a\u670d\u52a1\u7aef\u5c06\u56de\u6eda\u4e8b\u52a1\uff0c\u4e0d\u4f1a\u5c06\u534a\u4e8b\u52a1\u6d88\u606f\u6295\u9012\u7ed9\u6d88\u8d39\u8005\u3002")))),(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},"\u5728\u65ad\u7f51\u6216\u8005\u662f\u751f\u4ea7\u8005\u5e94\u7528\u91cd\u542f\u7684\u7279\u6b8a\u60c5\u51b5\u4e0b\uff0c\u82e5\u670d\u52a1\u7aef\u672a\u6536\u5230\u53d1\u9001\u8005\u63d0\u4ea4\u7684\u4e8c\u6b21\u786e\u8ba4\u7ed3\u679c\uff0c\u6216\u670d\u52a1\u7aef\u6536\u5230\u7684\u4e8c\u6b21\u786e\u8ba4\u7ed3\u679c\u4e3aUnknown\u672a\u77e5\u72b6\u6001\uff0c\u7ecf\u8fc7\u56fa\u5b9a\u65f6\u95f4\u540e\uff0c\u670d\u52a1\u7aef\u5c06\u5bf9\u6d88\u606f\u751f\u4ea7\u8005\u5373\u751f\u4ea7\u8005\u96c6\u7fa4\u4e2d\u4efb\u4e00\u751f\u4ea7\u8005\u5b9e\u4f8b\u53d1\u8d77\u6d88\u606f\u56de\u67e5\u3002\n",(0,r.yg)("strong",{parentName:"p"},"\u8bf4\u660e")," \u670d\u52a1\u7aef\u56de\u67e5\u7684\u95f4\u9694\u65f6\u95f4\u548c\u6700\u5927\u56de\u67e5\u6b21\u6570\uff0c\u8bf7\u53c2\u89c1",(0,r.yg)("a",{parentName:"p",href:"/zh/docs/introduction/03limits"},"\u53c2\u6570\u9650\u5236"),"\u3002")),(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},"\u751f\u4ea7\u8005\u6536\u5230\u6d88\u606f\u56de\u67e5\u540e\uff0c\u9700\u8981\u68c0\u67e5\u5bf9\u5e94\u6d88\u606f\u7684\u672c\u5730\u4e8b\u52a1\u6267\u884c\u7684\u6700\u7ec8\u7ed3\u679c\u3002")),(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},"\u751f\u4ea7\u8005\u6839\u636e\u68c0\u67e5\u5230\u7684\u672c\u5730\u4e8b\u52a1\u7684\u6700\u7ec8\u72b6\u6001\u518d\u6b21\u63d0\u4ea4\u4e8c\u6b21\u786e\u8ba4\uff0c\u670d\u52a1\u7aef\u4ecd\u6309\u7167\u6b65\u9aa44\u5bf9\u534a\u4e8b\u52a1\u6d88\u606f\u8fdb\u884c\u5904\u7406\u3002"))),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u4e8b\u52a1\u6d88\u606f\u751f\u547d\u5468\u671f"),"\n",(0,r.yg)("img",{alt:"\u4e8b\u52a1\u6d88\u606f",src:a(56406).A,width:"1183",height:"218"})),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u521d\u59cb\u5316\uff1a\u534a\u4e8b\u52a1\u6d88\u606f\u88ab\u751f\u4ea7\u8005\u6784\u5efa\u5e76\u5b8c\u6210\u521d\u59cb\u5316\uff0c\u5f85\u53d1\u9001\u5230\u670d\u52a1\u7aef\u7684\u72b6\u6001\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u4e8b\u52a1\u5f85\u63d0\u4ea4\uff1a\u534a\u4e8b\u52a1\u6d88\u606f\u88ab\u53d1\u9001\u5230\u670d\u52a1\u7aef\uff0c\u548c\u666e\u901a\u6d88\u606f\u4e0d\u540c\uff0c\u5e76\u4e0d\u4f1a\u76f4\u63a5\u88ab\u670d\u52a1\u7aef\u6301\u4e45\u5316\uff0c\u800c\u662f\u4f1a\u88ab\u5355\u72ec\u5b58\u50a8\u5230\u4e8b\u52a1\u5b58\u50a8\u7cfb\u7edf\u4e2d\uff0c\u7b49\u5f85\u7b2c\u4e8c\u9636\u6bb5\u672c\u5730\u4e8b\u52a1\u8fd4\u56de\u6267\u884c\u7ed3\u679c\u540e\u518d\u63d0\u4ea4\u3002\u6b64\u65f6\u6d88\u606f\u5bf9\u4e0b\u6e38\u6d88\u8d39\u8005\u4e0d\u53ef\u89c1\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u6d88\u606f\u56de\u6eda\uff1a\u7b2c\u4e8c\u9636\u6bb5\u5982\u679c\u4e8b\u52a1\u6267\u884c\u7ed3\u679c\u660e\u786e\u4e3a\u56de\u6eda\uff0c\u670d\u52a1\u7aef\u4f1a\u5c06\u534a\u4e8b\u52a1\u6d88\u606f\u56de\u6eda\uff0c\u8be5\u4e8b\u52a1\u6d88\u606f\u6d41\u7a0b\u7ec8\u6b62\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u63d0\u4ea4\u5f85\u6d88\u8d39\uff1a\u7b2c\u4e8c\u9636\u6bb5\u5982\u679c\u4e8b\u52a1\u6267\u884c\u7ed3\u679c\u660e\u786e\u4e3a\u63d0\u4ea4\uff0c\u670d\u52a1\u7aef\u4f1a\u5c06\u534a\u4e8b\u52a1\u6d88\u606f\u91cd\u65b0\u5b58\u50a8\u5230\u666e\u901a\u5b58\u50a8\u7cfb\u7edf\u4e2d\uff0c\u6b64\u65f6\u6d88\u606f\u5bf9\u4e0b\u6e38\u6d88\u8d39\u8005\u53ef\u89c1\uff0c\u7b49\u5f85\u88ab\u6d88\u8d39\u8005\u83b7\u53d6\u5e76\u6d88\u8d39\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u6d88\u8d39\u4e2d\uff1a\u6d88\u606f\u88ab\u6d88\u8d39\u8005\u83b7\u53d6\uff0c\u5e76\u6309\u7167\u6d88\u8d39\u8005\u672c\u5730\u7684\u4e1a\u52a1\u903b\u8f91\u8fdb\u884c\u5904\u7406\u7684\u8fc7\u7a0b\u3002 \u6b64\u65f6\u670d\u52a1\u7aef\u4f1a\u7b49\u5f85\u6d88\u8d39\u8005\u5b8c\u6210\u6d88\u8d39\u5e76\u63d0\u4ea4\u6d88\u8d39\u7ed3\u679c\uff0c\u5982\u679c\u4e00\u5b9a\u65f6\u95f4\u540e\u6ca1\u6709\u6536\u5230\u6d88\u8d39\u8005\u7684\u54cd\u5e94\uff0cApache RocketMQ\u4f1a\u5bf9\u6d88\u606f\u8fdb\u884c\u91cd\u8bd5\u5904\u7406\u3002\u5177\u4f53\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1",(0,r.yg)("a",{parentName:"p",href:"/zh/docs/featureBehavior/10consumerretrypolicy"},"\u6d88\u8d39\u91cd\u8bd5"),"\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u6d88\u8d39\u63d0\u4ea4\uff1a\u6d88\u8d39\u8005\u5b8c\u6210\u6d88\u8d39\u5904\u7406\uff0c\u5e76\u5411\u670d\u52a1\u7aef\u63d0\u4ea4\u6d88\u8d39\u7ed3\u679c\uff0c\u670d\u52a1\u7aef\u6807\u8bb0\u5f53\u524d\u6d88\u606f\u5df2\u7ecf\u88ab\u5904\u7406\uff08\u5305\u62ec\u6d88\u8d39\u6210\u529f\u548c\u5931\u8d25\uff09\u3002 Apache RocketMQ\u9ed8\u8ba4\u652f\u6301\u4fdd\u7559\u6240\u6709\u6d88\u606f\uff0c\u6b64\u65f6\u6d88\u606f\u6570\u636e\u5e76\u4e0d\u4f1a\u7acb\u5373\u88ab\u5220\u9664\uff0c\u53ea\u662f\u903b\u8f91\u6807\u8bb0\u5df2\u6d88\u8d39\u3002\u6d88\u606f\u5728\u4fdd\u5b58\u65f6\u95f4\u5230\u671f\u6216\u5b58\u50a8\u7a7a\u95f4\u4e0d\u8db3\u88ab\u5220\u9664\u524d\uff0c\u6d88\u8d39\u8005\u4ecd\u7136\u53ef\u4ee5\u56de\u6eaf\u6d88\u606f\u91cd\u65b0\u6d88\u8d39\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u6d88\u606f\u5220\u9664\uff1aApache RocketMQ\u6309\u7167\u6d88\u606f\u4fdd\u5b58\u673a\u5236\u6eda\u52a8\u6e05\u7406\u6700\u65e9\u7684\u6d88\u606f\u6570\u636e\uff0c\u5c06\u6d88\u606f\u4ece\u7269\u7406\u6587\u4ef6\u4e2d\u5220\u9664\u3002\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1",(0,r.yg)("a",{parentName:"p",href:"/zh/docs/featureBehavior/11messagestorepolicy"},"\u6d88\u606f\u5b58\u50a8\u548c\u6e05\u7406\u673a\u5236"),"\u3002"))),(0,r.yg)("h2",{id:"\u4f7f\u7528\u9650\u5236"},"\u4f7f\u7528\u9650\u5236"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u6d88\u606f\u7c7b\u578b\u4e00\u81f4\u6027")),(0,r.yg)("p",null,"\u4e8b\u52a1\u6d88\u606f\u4ec5\u652f\u6301\u5728 MessageType \u4e3a Transaction \u7684\u4e3b\u9898\u5185\u4f7f\u7528\uff0c\u5373\u4e8b\u52a1\u6d88\u606f\u53ea\u80fd\u53d1\u9001\u81f3\u7c7b\u578b\u4e3a\u4e8b\u52a1\u6d88\u606f\u7684\u4e3b\u9898\u4e2d\uff0c\u53d1\u9001\u7684\u6d88\u606f\u7684\u7c7b\u578b\u5fc5\u987b\u548c\u4e3b\u9898\u7684\u7c7b\u578b\u4e00\u81f4\u3002"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u6d88\u8d39\u4e8b\u52a1\u6027")),(0,r.yg)("p",null,"Apache RocketMQ \u4e8b\u52a1\u6d88\u606f\u4fdd\u8bc1\u672c\u5730\u4e3b\u5206\u652f\u4e8b\u52a1\u548c\u4e0b\u6e38\u6d88\u606f\u53d1\u9001\u4e8b\u52a1\u7684\u4e00\u81f4\u6027\uff0c\u4f46\u4e0d\u4fdd\u8bc1\u6d88\u606f\u6d88\u8d39\u7ed3\u679c\u548c\u4e0a\u6e38\u4e8b\u52a1\u7684\u4e00\u81f4\u6027\u3002\u56e0\u6b64\u9700\u8981\u4e0b\u6e38\u4e1a\u52a1\u5206\u652f\u81ea\u884c\u4fdd\u8bc1\u6d88\u606f\u6b63\u786e\u5904\u7406\uff0c\u5efa\u8bae\u6d88\u8d39\u7aef\u505a\u597d",(0,r.yg)("a",{parentName:"p",href:"/zh/docs/featureBehavior/10consumerretrypolicy"},"\u6d88\u8d39\u91cd\u8bd5"),"\uff0c\u5982\u679c\u6709\u77ed\u6682\u5931\u8d25\u53ef\u4ee5\u5229\u7528\u91cd\u8bd5\u673a\u5236\u4fdd\u8bc1\u6700\u7ec8\u5904\u7406\u6210\u529f\u3002"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u4e2d\u95f4\u72b6\u6001\u53ef\u89c1\u6027")),(0,r.yg)("p",null,"Apache RocketMQ \u4e8b\u52a1\u6d88\u606f\u4e3a\u6700\u7ec8\u4e00\u81f4\u6027\uff0c\u5373\u5728\u6d88\u606f\u63d0\u4ea4\u5230\u4e0b\u6e38\u6d88\u8d39\u7aef\u5904\u7406\u5b8c\u6210\u4e4b\u524d\uff0c\u4e0b\u6e38\u5206\u652f\u548c\u4e0a\u6e38\u4e8b\u52a1\u4e4b\u95f4\u7684\u72b6\u6001\u4f1a\u4e0d\u4e00\u81f4\u3002\u56e0\u6b64\uff0c\u4e8b\u52a1\u6d88\u606f\u4ec5\u9002\u5408\u63a5\u53d7\u5f02\u6b65\u6267\u884c\u7684\u4e8b\u52a1\u573a\u666f\u3002"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u4e8b\u52a1\u8d85\u65f6\u673a\u5236")),(0,r.yg)("p",null,"Apache RocketMQ \u4e8b\u52a1\u6d88\u606f\u7684\u751f\u547d\u5468\u671f\u5b58\u5728\u8d85\u65f6\u673a\u5236\uff0c\u5373\u534a\u4e8b\u52a1\u6d88\u606f\u88ab\u751f\u4ea7\u8005\u53d1\u9001\u670d\u52a1\u7aef\u540e\uff0c\u5982\u679c\u5728\u6307\u5b9a\u65f6\u95f4\u5185\u670d\u52a1\u7aef\u65e0\u6cd5\u786e\u8ba4\u63d0\u4ea4\u6216\u8005\u56de\u6eda\u72b6\u6001\uff0c\u5219\u6d88\u606f\u9ed8\u8ba4\u4f1a\u88ab\u56de\u6eda\u3002\u4e8b\u52a1\u8d85\u65f6\u65f6\u95f4\uff0c\u8bf7\u53c2\u89c1",(0,r.yg)("a",{parentName:"p",href:"/zh/docs/introduction/03limits"},"\u53c2\u6570\u9650\u5236"),"\u3002"),(0,r.yg)("h2",{id:"\u4f7f\u7528\u793a\u4f8b"},"\u4f7f\u7528\u793a\u4f8b"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u521b\u5efa\u4e3b\u9898")),(0,r.yg)("p",null,"Apache RocketMQ 5.0\u7248\u672c\u4e0b\u521b\u5efa\u4e3b\u9898\u64cd\u4f5c\uff0c\u63a8\u8350\u4f7f\u7528mqadmin\u5de5\u5177\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5bf9\u4e8e\u6d88\u606f\u7c7b\u578b\u9700\u8981\u901a\u8fc7\u5c5e\u6027\u53c2\u6570\u6dfb\u52a0\u3002\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-shell"},"sh mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c <cluster_name> -a +message.type=TRANSACTION\n")),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u53d1\u9001\u6d88\u606f")),(0,r.yg)("p",null,"\u4e8b\u52a1\u6d88\u606f\u76f8\u6bd4\u666e\u901a\u6d88\u606f\u53d1\u9001\u65f6\u9700\u8981\u4fee\u6539\u4ee5\u4e0b\u51e0\u70b9\uff1a"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u53d1\u9001\u4e8b\u52a1\u6d88\u606f\u524d\uff0c\u9700\u8981\u5f00\u542f\u4e8b\u52a1\u5e76\u5173\u8054\u672c\u5730\u7684\u4e8b\u52a1\u6267\u884c\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u4e3a\u4fdd\u8bc1\u4e8b\u52a1\u4e00\u81f4\u6027\uff0c\u5728\u6784\u5efa\u751f\u4ea7\u8005\u65f6\uff0c\u5fc5\u987b\u8bbe\u7f6e\u4e8b\u52a1\u68c0\u67e5\u5668\u548c\u9884\u7ed1\u5b9a\u4e8b\u52a1\u6d88\u606f\u53d1\u9001\u7684\u4e3b\u9898\u5217\u8868\uff0c\u5ba2\u6237\u7aef\u5185\u7f6e\u7684\u4e8b\u52a1\u68c0\u67e5\u5668\u4f1a\u5bf9\u7ed1\u5b9a\u7684\u4e8b\u52a1\u4e3b\u9898\u505a\u5f02\u5e38\u72b6\u6001\u6062\u590d\u3002"))),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u521b\u5efa\u4e8b\u52a1\u4e3b\u9898")),(0,r.yg)("p",null,(0,r.yg)("em",{parentName:"p"},"NORMAL\u7c7b\u578bTopic\u4e0d\u652f\u6301TRANSACTION\u7c7b\u578b\u6d88\u606f\uff0c\u751f\u4ea7\u6d88\u606f\u4f1a\u62a5\u9519\u3002")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-bash"},"./bin/mqadmin updatetopic -n localhost:9876 -t TestTopic -c DefaultCluster -a +message.type=TRANSACTION\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"-c \u96c6\u7fa4\u540d\u79f0"),(0,r.yg)("li",{parentName:"ul"},"-t Topic\u540d\u79f0"),(0,r.yg)("li",{parentName:"ul"},"-n nameserver\u5730\u5740"),(0,r.yg)("li",{parentName:"ul"},"-a \u989d\u5916\u5c5e\u6027\uff0c\u672c\u4f8b\u7ed9\u4e3b\u9898\u6dfb\u52a0\u4e86",(0,r.yg)("inlineCode",{parentName:"li"},"message.type"),"\u4e3a",(0,r.yg)("inlineCode",{parentName:"li"},"TRANSACTION"),"\u7684\u5c5e\u6027\u7528\u6765\u652f\u6301\u4e8b\u52a1\u6d88\u606f")),(0,r.yg)("p",null,"\u4ee5Java\u8bed\u8a00\u4e3a\u4f8b\uff0c\u4f7f\u7528\u4e8b\u52a1\u6d88\u606f\u793a\u4f8b\u53c2\u8003\u5982\u4e0b\uff1a"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-java"},' //\u6f14\u793ademo\uff0c\u6a21\u62df\u8ba2\u5355\u8868\u67e5\u8be2\u670d\u52a1\uff0c\u7528\u6765\u786e\u8ba4\u8ba2\u5355\u4e8b\u52a1\u662f\u5426\u63d0\u4ea4\u6210\u529f\u3002\n private static boolean checkOrderById(String orderId) {\n return true;\n }\n //\u6f14\u793ademo\uff0c\u6a21\u62df\u672c\u5730\u4e8b\u52a1\u7684\u6267\u884c\u7ed3\u679c\u3002\n private static boolean doLocalTransaction() {\n return true;\n }\n public static void main(String[] args) throws ClientException {\n ClientServiceProvider provider = new ClientServiceProvider();\n MessageBuilder messageBuilder = new MessageBuilderImpl();\n //\u6784\u9020\u4e8b\u52a1\u751f\u4ea7\u8005\uff1a\u4e8b\u52a1\u6d88\u606f\u9700\u8981\u751f\u4ea7\u8005\u6784\u5efa\u4e00\u4e2a\u4e8b\u52a1\u68c0\u67e5\u5668\uff0c\u7528\u4e8e\u68c0\u67e5\u786e\u8ba4\u5f02\u5e38\u534a\u4e8b\u52a1\u7684\u4e2d\u95f4\u72b6\u6001\u3002\n Producer producer = provider.newProducerBuilder()\n .setTransactionChecker(messageView -> {\n /**\n * \u4e8b\u52a1\u68c0\u67e5\u5668\u4e00\u822c\u662f\u6839\u636e\u4e1a\u52a1\u7684ID\u53bb\u68c0\u67e5\u672c\u5730\u4e8b\u52a1\u662f\u5426\u6b63\u786e\u63d0\u4ea4\u8fd8\u662f\u56de\u6eda\uff0c\u6b64\u5904\u4ee5\u8ba2\u5355ID\u5c5e\u6027\u4e3a\u4f8b\u3002\n * \u5728\u8ba2\u5355\u8868\u627e\u5230\u4e86\u8fd9\u4e2a\u8ba2\u5355\uff0c\u8bf4\u660e\u672c\u5730\u4e8b\u52a1\u63d2\u5165\u8ba2\u5355\u7684\u64cd\u4f5c\u5df2\u7ecf\u6b63\u786e\u63d0\u4ea4\uff1b\u5982\u679c\u8ba2\u5355\u8868\u6ca1\u6709\u8ba2\u5355\uff0c\u8bf4\u660e\u672c\u5730\u4e8b\u52a1\u5df2\u7ecf\u56de\u6eda\u3002\n */\n final String orderId = messageView.getProperties().get("OrderId");\n if (Strings.isNullOrEmpty(orderId)) {\n // \u9519\u8bef\u7684\u6d88\u606f\uff0c\u76f4\u63a5\u8fd4\u56deRollback\u3002\n return TransactionResolution.ROLLBACK;\n }\n return checkOrderById(orderId) ? TransactionResolution.COMMIT : TransactionResolution.ROLLBACK;\n })\n .build();\n //\u5f00\u542f\u4e8b\u52a1\u5206\u652f\u3002\n final Transaction transaction;\n try {\n transaction = producer.beginTransaction();\n } catch (ClientException e) {\n e.printStackTrace();\n //\u4e8b\u52a1\u5206\u652f\u5f00\u542f\u5931\u8d25\uff0c\u76f4\u63a5\u9000\u51fa\u3002\n return;\n }\n Message message = messageBuilder.setTopic("topic")\n //\u8bbe\u7f6e\u6d88\u606f\u7d22\u5f15\u952e\uff0c\u53ef\u6839\u636e\u5173\u952e\u5b57\u7cbe\u786e\u67e5\u627e\u67d0\u6761\u6d88\u606f\u3002\n .setKeys("messageKey")\n //\u8bbe\u7f6e\u6d88\u606fTag\uff0c\u7528\u4e8e\u6d88\u8d39\u7aef\u6839\u636e\u6307\u5b9aTag\u8fc7\u6ee4\u6d88\u606f\u3002\n .setTag("messageTag")\n //\u4e00\u822c\u4e8b\u52a1\u6d88\u606f\u90fd\u4f1a\u8bbe\u7f6e\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\u5173\u8054\u7684\u552f\u4e00ID\uff0c\u7528\u6765\u505a\u672c\u5730\u4e8b\u52a1\u56de\u67e5\u7684\u6821\u9a8c\u3002\n .addProperty("OrderId", "xxx")\n //\u6d88\u606f\u4f53\u3002\n .setBody("messageBody".getBytes())\n .build();\n //\u53d1\u9001\u534a\u4e8b\u52a1\u6d88\u606f\n final SendReceipt sendReceipt;\n try {\n sendReceipt = producer.send(message, transaction);\n } catch (ClientException e) {\n //\u534a\u4e8b\u52a1\u6d88\u606f\u53d1\u9001\u5931\u8d25\uff0c\u4e8b\u52a1\u53ef\u4ee5\u76f4\u63a5\u9000\u51fa\u5e76\u56de\u6eda\u3002\n return;\n }\n /**\n * \u6267\u884c\u672c\u5730\u4e8b\u52a1\uff0c\u5e76\u786e\u5b9a\u672c\u5730\u4e8b\u52a1\u7ed3\u679c\u3002\n * 1. \u5982\u679c\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6210\u529f\uff0c\u5219\u63d0\u4ea4\u6d88\u606f\u4e8b\u52a1\u3002\n * 2. \u5982\u679c\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u5931\u8d25\uff0c\u5219\u56de\u6eda\u6d88\u606f\u4e8b\u52a1\u3002\n * 3. \u5982\u679c\u672c\u5730\u4e8b\u52a1\u672a\u77e5\u5f02\u5e38\uff0c\u5219\u4e0d\u5904\u7406\uff0c\u7b49\u5f85\u4e8b\u52a1\u6d88\u606f\u56de\u67e5\u3002\n *\n */\n boolean localTransactionOk = doLocalTransaction();\n if (localTransactionOk) {\n try {\n transaction.commit();\n } catch (ClientException e) {\n // \u4e1a\u52a1\u53ef\u4ee5\u81ea\u8eab\u5bf9\u5b9e\u65f6\u6027\u7684\u8981\u6c42\u9009\u62e9\u662f\u5426\u91cd\u8bd5\uff0c\u5982\u679c\u653e\u5f03\u91cd\u8bd5\uff0c\u53ef\u4ee5\u4f9d\u8d56\u4e8b\u52a1\u6d88\u606f\u56de\u67e5\u673a\u5236\u8fdb\u884c\u4e8b\u52a1\u72b6\u6001\u7684\u63d0\u4ea4\u3002\n e.printStackTrace();\n }\n } else {\n try {\n transaction.rollback();\n } catch (ClientException e) {\n // \u5efa\u8bae\u8bb0\u5f55\u5f02\u5e38\u4fe1\u606f\uff0c\u56de\u6eda\u5f02\u5e38\u65f6\u53ef\u4ee5\u65e0\u9700\u91cd\u8bd5\uff0c\u4f9d\u8d56\u4e8b\u52a1\u6d88\u606f\u56de\u67e5\u673a\u5236\u8fdb\u884c\u4e8b\u52a1\u72b6\u6001\u7684\u63d0\u4ea4\u3002\n e.printStackTrace();\n }\n }\n }\n')),(0,r.yg)("h2",{id:"\u4f7f\u7528\u5efa\u8bae"},"\u4f7f\u7528\u5efa\u8bae"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"\u907f\u514d\u5927\u91cf\u672a\u51b3\u4e8b\u52a1\u5bfc\u81f4\u8d85\u65f6")),(0,r.yg)("p",null,"Apache RocketMQ\u652f\u6301\u5728\u4e8b\u52a1\u63d0\u4ea4\u9636\u6bb5\u5f02\u5e38\u7684\u60c5\u51b5\u4e0b\u53d1\u8d77\u4e8b\u52a1\u56de\u67e5\uff0c\u4fdd\u8bc1\u4e8b\u52a1\u4e00\u81f4\u6027\u3002\u4f46\u751f\u4ea7\u8005\u5e94\u8be5\u5c3d\u91cf\u907f\u514d\u672c\u5730\u4e8b\u52a1\u8fd4\u56de\u672a\u77e5\u7ed3\u679c\u3002\u5927\u91cf\u7684\u4e8b\u52a1\u68c0\u67e5\u4f1a\u5bfc\u81f4\u7cfb\u7edf\u6027\u80fd\u53d7\u635f\uff0c\u5bb9\u6613\u5bfc\u81f4\u4e8b\u52a1\u5904\u7406\u5ef6\u8fdf\u3002"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},'\u6b63\u786e\u5904\u7406"\u8fdb\u884c\u4e2d"\u7684\u4e8b\u52a1')),(0,r.yg)("p",null,"\u6d88\u606f\u56de\u67e5\u65f6\uff0c\u5bf9\u4e8e\u6b63\u5728\u8fdb\u884c\u4e2d\u7684\u4e8b\u52a1\u4e0d\u8981\u8fd4\u56deRollback\u6216Commit\u7ed3\u679c\uff0c\u5e94\u7ee7\u7eed\u4fdd\u6301Unknown\u7684\u72b6\u6001\u3002 \u4e00\u822c\u51fa\u73b0\u6d88\u606f\u56de\u67e5\u65f6\u4e8b\u52a1\u6b63\u5728\u5904\u7406\u7684\u539f\u56e0\u4e3a\uff1a\u4e8b\u52a1\u6267\u884c\u8f83\u6162\uff0c\u6d88\u606f\u56de\u67e5\u592a\u5feb\u3002\u89e3\u51b3\u65b9\u6848\u5982\u4e0b\uff1a"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u5c06\u7b2c\u4e00\u6b21\u4e8b\u52a1\u56de\u67e5\u65f6\u95f4\u8bbe\u7f6e\u8f83\u5927\u4e00\u4e9b\uff0c\u4f46\u53ef\u80fd\u5bfc\u81f4\u4f9d\u8d56\u56de\u67e5\u7684\u4e8b\u52a1\u63d0\u4ea4\u5ef6\u8fdf\u8f83\u5927\u3002")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"\u7a0b\u5e8f\u80fd\u6b63\u786e\u8bc6\u522b\u6b63\u5728\u8fdb\u884c\u4e2d\u7684\u4e8b\u52a1\u3002"))))}y.isMDXComponent=!0},56406:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/lifecyclefortrans-fe4a49f1c9fdae5d590a64546722036f.png"},29762:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/tradetrans01-636d42fb6584de6c51692d0889af5c2d.png"},4015:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/tradewithtrans-25be17fcdedb8343a0d2633e693d126d.png"},15609:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/transflow-0b07236d124ddb814aeaf5f6b5f3f72c.png"},36796:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/transwithnormal-f7d951385520fc18aea8d85f0cd86c27.png"}}]);