readMessages
Read accumulated messages from a subscription, with options to limit count and clear buffer after reading. Check status field for connection state.
Instructions
读取指定订阅已积累的消息。 默认读取全部并清空缓冲区(clearAfterRead=true);设为 false 可保留消息继续累积。 通过 limit 参数可只取最近 N 条消息。 返回 status 字段可判断连接是否仍然活跃(active / reconnecting / closed)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 最多返回最近 N 条消息;不填则返回全部缓冲消息 | |
| clearAfterRead | No | 读取后是否清空缓冲区(默认 true) | |
| subscriptionId | Yes | 由 startSubscription 返回的订阅 ID |