中文(URocketMQ 消息队列)
URocketMQ 提供托管式 RocketMQ 消息队列服务,适用于高并发、低延迟的异步消息通信场景,常用于电商下单、支付、营销活动等业务解耦与削峰填谷。
适用场景
- 削峰填谷:秒杀/大促流量洪峰时用消息排队保护后端
- 异步解耦:订单→库存→物流→通知等链路解耦
- 可靠投递:确保消息可追踪、可重试(结合业务幂等)
举例:秒杀下单削峰
- 前端请求到达后,应用快速校验并写入消息:
SECKILL_ORDER_CREATE - 下单消费者按队列速度处理,逐步写入数据库,避免 DB 被打爆
- 失败消息重试;超过次数进入人工/补偿流程(由业务实现)
最佳实践
- 消息体带业务唯一键(如 orderId),消费侧做幂等
- 合理设置重试与超时,避免雪崩重试
- 监控积压与消费失败率(UMon/告警)
English (URocketMQ)
URocketMQ is a managed RocketMQ messaging service for high-concurrency, low-latency asynchronous communication—commonly used for e-commerce order/payment/marketing workflows and traffic smoothing.
Use cases
- Traffic buffering for flash sales
- Async decoupling across services
- Reliable delivery with retries and traceability
Example: Flash-sale order smoothing
- Validate request quickly and publish
SECKILL_ORDER_CREATE - Consumers process at controlled rate to protect the database
- Retry failures; route to compensation flow after max retries