同步命令消息
接口边界
- 调用方:仅限受信业务后端
- 作用域:消息来自持久存储,但本次最新确认 generation 只保存在请求处理进程内存中,默认约 5 分钟且最多 4096 个 UID。
- 成功判定:limit 限制返回数量,不限制服务端枚举命令 Channel 与扫描消息的总成本。
- 恢复:sync 与 syncack 必须保持节点亲和;进程重启、过期或驱逐后应重新 sync。
已弃用
POST
/message/sync返回最新持久 CMD generation;message_seq 仅兼容接收但会被忽略。
请求主体
application/json
命令消息同步的用户与分页上限。
TypeScript 定义
在 TypeScript 中使用 request body 类型。
旧式命令消息同步参数。
响应主体
application/json
application/json
application/json
[ { "header": { "no_persist": 0, "red_dot": 0, "sync_once": 0 }, "setting": 0, "message_id": 0, "message_idstr": "string", "client_msg_no": "string", "end": 0, "end_reason": 0, "error": "string", "stream_data": "string", "event_meta": { "has_events": true, "completed": true, "event_version": 0, "last_msg_event_seq": 0, "event_count": 0, "open_event_count": 0, "events": [ { "event_key": "string", "status": "string", "last_msg_event_seq": 0, "snapshot": null, "end_reason": 0, "error": "string" } ] }, "event_sync_hint": { "client_msg_no": "string", "from_msg_event_seq": 0 }, "message_seq": 0, "from_uid": "string", "channel_id": "string", "channel_type": 0, "topic": "string", "expire": 0, "timestamp": 0, "payload": "string" }]