RockteMQ-AI commented on issue #11049:
URL: https://github.com/apache/rocketmq/issues/11049#issuecomment-5556527850

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   Verified against the current `develop` branch. The batch send receipt 
mismatch is confirmed:
   
   1. **`LocalMessageService#sendMessage`** (line 98): When `msgList.size() > 
1`, messages are collapsed into a `MessageBatch` and sent as a single batch, 
returning one `SendResult`.
   2. **`ClusterMessageService#sendMessage`** (line 68): For `msgList.size() != 
1`, calls `sendMessageAsync` with the full list, also returning one 
`SendResult`.
   3. **`SendMessageActivity#convertToSendMessageResponse`** (line 331): 
Iterates the result list one-to-one, so N-message request produces 1-entry 
response.
   
   **Root Cause:** The proxy collapses N messages into a single batch send and 
returns one `SendResult`, but the gRPC v2 protocol expects one 
`SendResultEntry` per message.
   
   **Impact:** Critical — All v2 SDK batch sends through the proxy fail with 
`InternalErrorException`, causing automatic retries that duplicate every 
message. The broker stores messages correctly but callers see failures.
   
   **Severity:** Critical — data duplication + send failures for all batch 
sends via gRPC v2.
   
   **Fix direction:** `convertToSendMessageResponse` should expand the single 
batch `SendResult` into N `SendResultEntry` items (one per message), using 
per-message offsets and message IDs from the batch result.
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*
   


-- 
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]

Reply via email to