[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"site-config":3,"primary-menu":6,"cat-rocketmq":85,"catposts-rocketmq":98,"post-detail-post-rocketmq-reliable-24e9291a":207},{"config":4,"socialLinks":5},null,[],{"metadata":7,"spec":10,"menuItems":20},{"name":8,"creationTimestamp":9},"primary","2026-09-12T06:13:55.024154Z",{"displayName":11,"menuItems":12},"主菜单",[13,14,15,16,17,18,19],"88c3f10b-321c-4092-86a8-70db00251b74","menu-item-izrtmxer","c4c814d1-0c2c-456b-8c96-4864965fee94","menu-item-column","menu-item-tools","menu-item-zsxq","menu-item-ocrxlczu",[21,30,40,49,58,67,76],{"displayName":22,"metadata":23,"spec":25,"status":28,"children":29},"首页",{"name":13,"creationTimestamp":24},"2026-09-12T06:13:54.422830Z",{"displayName":22,"href":26,"priority":27,"menuName":8},"\u002F",0,{"displayName":22,"href":26},[],{"displayName":31,"metadata":32,"spec":34,"status":38,"children":39},"Java面试八股",{"name":14,"creationTimestamp":33},"2026-09-13T09:42:02.854891Z",{"displayName":31,"href":35,"target":36,"priority":37,"menuName":8},"\u002Fjava-interview","_self",1,{"displayName":31,"href":35},[],{"displayName":41,"metadata":42,"spec":44,"status":47,"children":48},"文章",{"name":15,"creationTimestamp":43},"2026-09-12T06:13:54.457307Z",{"displayName":41,"href":45,"priority":46,"menuName":8},"\u002Farchives",2,{"displayName":41,"href":45},[],{"displayName":50,"metadata":51,"spec":53,"status":56,"children":57},"项目实战",{"name":16,"creationTimestamp":52},"2026-09-14T00:35:08.138170Z",{"displayName":50,"href":54,"target":36,"priority":55,"menuName":8},"\u002Fcolumn",3,{"displayName":50,"href":54},[],{"displayName":59,"metadata":60,"spec":62,"status":65,"children":66},"在线工具",{"name":17,"creationTimestamp":61},"2026-09-14T00:35:08.171474Z",{"displayName":59,"href":63,"target":36,"priority":64,"menuName":8},"\u002Ftools",4,{"displayName":59,"href":63},[],{"displayName":68,"metadata":69,"spec":71,"status":74,"children":75},"知识星球",{"name":18,"creationTimestamp":70},"2026-09-14T00:35:08.199145Z",{"displayName":68,"href":72,"target":36,"priority":73,"menuName":8},"\u002Fzsxq",5,{"displayName":68,"href":72},[],{"displayName":77,"metadata":78,"spec":80,"status":83,"children":84},"特价云服务器",{"name":19,"creationTimestamp":79},"2026-09-25T15:30:59.201614Z",{"displayName":77,"href":81,"target":36,"priority":82,"menuName":8},"\u002Fserver",6,{"displayName":77,"href":81},[],{"metadata":86,"spec":91,"status":96,"postCount":73},{"name":87,"creationTimestamp":88,"labels":89},"rocketmq","2026-09-13T09:13:25.595131Z",{"haloweb.section":90},"interview",{"displayName":92,"slug":87,"cover":93,"description":94,"priority":64,"hideFromList":95,"preventParentPostCascadeQuery":95},"RocketMQ 面试题","","RocketMQ 面试题：消息存储与刷盘、顺序消息、事务消息、重试积压与高可用。",false,{"permalink":97,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Frocketmq",[99,123,144,165,186],{"metadata":100,"spec":103,"status":112,"categories":117},{"name":101,"creationTimestamp":102},"post-rocketmq-consume-mode-70b00679","2026-09-13T10:01:00.899415Z",{"title":104,"slug":105,"cover":93,"excerpt":106,"publishTime":108,"categories":109,"tags":110,"priority":27,"pinned":95,"deleted":95,"visible":111,"allowComment":107},"RocketMQ 的集群消费和广播消费？","rocketmq-consume-mode",{"raw":93,"autoGenerate":107},true,"2026-09-13T10:01:00.945332Z",[87],[],"PUBLIC",{"permalink":113,"excerpt":114,"lastModifyTime":115,"phase":116},"\u002Farchives\u002Frocketmq-consume-mode","一、集群消费（CLUSTERING） 同一条消息只被消费组内的一个消费者消费。 负载均衡：队列在消费者之间分配。 实际生产中最常用。 二、广播消费（BROADCASTING） 同一条消息被消费组内所有消费者都消费一次。 每个消费者都消费全量消息。 适用于需要所有节点都处理的场景，如配置刷新、缓存失效","2026-09-16T09:14:33.803421Z","PUBLISHED",[118],{"metadata":119,"spec":121,"status":122,"postCount":73},{"name":87,"creationTimestamp":88,"labels":120},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":64,"hideFromList":95,"preventParentPostCascadeQuery":95},{"permalink":97,"postCount":73,"visiblePostCount":73},{"metadata":124,"spec":127,"status":134,"categories":138},{"name":125,"creationTimestamp":126},"post-rocketmq-vs-kafka-754ab039","2026-09-13T10:01:00.693827Z",{"title":128,"slug":129,"cover":93,"excerpt":130,"publishTime":131,"categories":132,"tags":133,"priority":27,"pinned":95,"deleted":95,"visible":111,"allowComment":107},"RocketMQ 和 Kafka 的区别？","rocketmq-vs-kafka",{"raw":93,"autoGenerate":107},"2026-09-13T10:01:00.741026Z",[87],[],{"permalink":135,"excerpt":136,"lastModifyTime":137,"phase":116},"\u002Farchives\u002Frocketmq-vs-kafka","一、对比 维度 RocketMQ Kafka 开发语言 Java Java\u002FScala 消息模型 Topic\u002FQueue Topic\u002FPartition 顺序消息 支持 支持（分区内） 延迟消息 支持 不原生支持 事务消息 支持 不支持 吞吐量 十万级 百万级 适用场景 业务消息、事务 日志、大数据","2026-09-16T09:13:49.958883Z",[139],{"metadata":140,"spec":142,"status":143,"postCount":73},{"name":87,"creationTimestamp":88,"labels":141},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":64,"hideFromList":95,"preventParentPostCascadeQuery":95},{"permalink":97,"postCount":73,"visiblePostCount":73},{"metadata":145,"spec":148,"status":155,"categories":159},{"name":146,"creationTimestamp":147},"post-rocketmq-reliable-24e9291a","2026-09-13T10:01:00.523686Z",{"title":149,"slug":150,"cover":93,"excerpt":151,"publishTime":152,"categories":153,"tags":154,"priority":27,"pinned":95,"deleted":95,"visible":111,"allowComment":107},"RocketMQ 如何保证消息不丢？","rocketmq-reliable",{"raw":93,"autoGenerate":107},"2026-09-13T10:01:00.572891Z",[87],[],{"permalink":156,"excerpt":157,"lastModifyTime":158,"phase":116},"\u002Farchives\u002Frocketmq-reliable","一、生产端不丢 同步发送：等待 Broker ACK，失败重试。 开启重试机制：retryTimesWhenSendFailed。 事务消息保证本地事务与消息发送一致。 二、Broker 不丢 同步刷盘：消息写入磁盘才返回成功（flushDiskType=SYNC_FLUSH）。 同步复制：主从都写","2026-09-16T09:14:33.332245Z",[160],{"metadata":161,"spec":163,"status":164,"postCount":73},{"name":87,"creationTimestamp":88,"labels":162},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":64,"hideFromList":95,"preventParentPostCascadeQuery":95},{"permalink":97,"postCount":73,"visiblePostCount":73},{"metadata":166,"spec":169,"status":176,"categories":180},{"name":167,"creationTimestamp":168},"post-rocketmq-message-type-0be350ba","2026-09-13T10:01:00.102484Z",{"title":170,"slug":171,"cover":93,"excerpt":172,"publishTime":173,"categories":174,"tags":175,"priority":27,"pinned":95,"deleted":95,"visible":111,"allowComment":107},"RocketMQ 支持哪些消息类型？","rocketmq-message-type",{"raw":93,"autoGenerate":107},"2026-09-13T10:01:00.301633Z",[87],[],{"permalink":177,"excerpt":178,"lastModifyTime":179,"phase":116},"\u002Farchives\u002Frocketmq-message-type","一、普通消息 最基本的消息，发完即走。 二、顺序消息 同一队列内消息严格有序。发送时用 MessageQueueSelector 把同一业务 key 的消息发到同一队列，消费时同一队列只一个线程消费。 三、延迟消息 消息发送后延迟一段时间才投递。RocketMQ 支持固定延迟级别（1s\u002F5s\u002F10s","2026-09-16T09:14:32.740019Z",[181],{"metadata":182,"spec":184,"status":185,"postCount":73},{"name":87,"creationTimestamp":88,"labels":183},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":64,"hideFromList":95,"preventParentPostCascadeQuery":95},{"permalink":97,"postCount":73,"visiblePostCount":73},{"metadata":187,"spec":190,"status":197,"categories":201},{"name":188,"creationTimestamp":189},"post-rocketmq-architecture-5f234f2c","2026-09-13T10:00:59.937731Z",{"title":191,"slug":192,"cover":93,"excerpt":193,"publishTime":194,"categories":195,"tags":196,"priority":27,"pinned":95,"deleted":95,"visible":111,"allowComment":107},"RocketMQ 的整体架构？","rocketmq-architecture",{"raw":93,"autoGenerate":107},"2026-09-13T10:00:59.982984Z",[87],[],{"permalink":198,"excerpt":199,"lastModifyTime":200,"phase":116},"\u002Farchives\u002Frocketmq-architecture","一、四大角色 Producer：消息生产者。 Consumer：消息消费者，支持 Push\u002FPull 两种模式。 NameServer：路由注册中心，无状态，可集群部署，节点间不通信。 Broker：消息存储与转发，可主从部署。 二、工作流程 NameServer 启动，Broker 启动后向所有 ","2026-09-16T09:14:32.272233Z",[202],{"metadata":203,"spec":205,"status":206,"postCount":73},{"name":87,"creationTimestamp":88,"labels":204},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":64,"hideFromList":95,"preventParentPostCascadeQuery":95},{"permalink":97,"postCount":73,"visiblePostCount":73},{"metadata":208,"spec":209,"status":213,"categories":214,"content":220},{"name":146,"creationTimestamp":147},{"title":149,"slug":150,"cover":93,"excerpt":210,"publishTime":152,"categories":211,"tags":212,"priority":27,"pinned":95,"deleted":95,"visible":111,"allowComment":107},{"raw":93,"autoGenerate":107},[87],[],{"permalink":156,"excerpt":157,"lastModifyTime":158,"phase":116},[215],{"metadata":216,"spec":218,"status":219,"postCount":73},{"name":87,"creationTimestamp":88,"labels":217},{"haloweb.section":90},{"displayName":92,"slug":87,"cover":93,"description":94,"priority":64,"hideFromList":95,"preventParentPostCascadeQuery":95},{"permalink":97,"postCount":73,"visiblePostCount":73},{"content":221,"raw":221},"\u003Ch2>一、生产端不丢\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>同步发送：等待 Broker ACK，失败重试。\u003C\u002Fli>\n\u003Cli>开启重试机制：retryTimesWhenSendFailed。\u003C\u002Fli>\n\u003Cli>事务消息保证本地事务与消息发送一致。\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>二、Broker 不丢\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>同步刷盘：消息写入磁盘才返回成功（flushDiskType=SYNC_FLUSH）。\u003C\u002Fli>\n\u003Cli>同步复制：主从都写入才返回成功（brokerRole=SYNC_MASTER）。\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>三、消费端不丢\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>手动 ACK：消费成功后才提交 offset。\u003C\u002Fli>\n\u003Cli>消费失败重新入队或进重试队列。\u003C\u002Fli>\n\u003Cli>死信队列：重试多次仍失败的消息进死信队列，人工处理。\u003C\u002Fli>\n\u003C\u002Ful>"]