chennaji9 opened a new pull request, #11324: URL: https://github.com/apache/rocketmq/pull/11324
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. --> ### Which Issue(s) This PR Fixes Fixes #11318 ### Brief Description Corrections to the `DefaultMQPullConsumer` API reference page (`docs/cn/client/java/API_Reference_ DefaultPullConsumer.md`), three of them behavioral: 1. **Example stuck on the first queue.** `NO_NEW_MSG: break` only exits the `switch`; the enclosing `while(true)` re-pulls the *same* queue, so the outer `for (MessageQueue mq : mqs)` never reaches the next queue. The per-queue loop is now labeled (`pullLoop:`) and `NO_NEW_MSG` breaks out of it, letting the example do what it demonstrates — iterate all queues of the topic. 2. **Fetched consume offset discarded.** `fetchConsumeOffset(mq, true)` was only printed while the first pull used the local map default `0`. The local table is now seeded with the stored offset before the first pull (`offset < 0` → start from the queue head). 3. **Table corrections:** field types `MessageModel`, `MessageQueueListener`, `OffsetStore`, `Set<String>`, `AllocateMessageQueueStrategy` (were `String`/`int`); `fetchMessageQueuesInBalance` returns `Set<MessageQueue>` (was `long`); the `PullResult`-returning `pull`/`pullBlockIfNotFound` overloads are synchronous (were described as 异步); the `DefaultMQPullConsumer(RPCHook)` row said "创建一个生产者"; `searchOffset` returns the queue logical offset (not 物理); `fetchConsumeOffset` described as max offset; removed a duplicated `void|void`. ### How Did You Test This Change? The example code block was extracted from the page and compiled as a standalone class against the client jar (`javac -cp client/target/classes:remoting/target/classes:common/target/classes` → success; only the expected deprecation note for the 4.x-style pull consumer API). Field types and method signatures cross-checked against `DefaultMQPullConsumer.java:71-89,362-434` at the PR base commit. Documentation-only page, no production code changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
