You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "unbridled-41 (via GitHub)" <gi...@apache.org> on 2026/10/03 14:24:52 UTC
Re: [PR] [ISSUE #11049] Return one send receipt entry per message for proxy batch sends [rocketmq]
unbridled-41 commented on PR #11050:
URL: https://github.com/apache/rocketmq/pull/11050#issuecomment-5970066494
Both points are addressed in 4594417b5.
**The fallback builds per-message results.** The unsplittable-id branch no longer reuses the batch result: it creates one result per request message from the id the request already carries plus the batch's first offset, while status, message queue, transaction id, offsetMsgId and region stay shared with the batch:
```java
String messageId = request.getMessages(i).getSystemProperties().getMessageId();
SendResult expanded = new SendResult(batchResult.getSendStatus(),
StringUtils.isNotBlank(messageId) ? messageId : batchResult.getMsgId(),
batchResult.getMessageQueue(), batchResult.getQueueOffset() + i,
batchResult.getTransactionId(), batchResult.getOffsetMsgId(), batchResult.getRegionId());
expanded.setRecallHandle(batchResult.getRecallHandle());
```
**Regression test for the local-mode shape.** `testConvertToSendMessageResponseExpandsLocalBatchWithRequestMessageIds` sends three request messages through a batch result carrying a single uniq id (what local mode returns) and pins each entry's own `messageId` and `queueOffset + i`. Before the change it fails exactly the way you described:
```
each entry must keep the request message's own id expected:<...018B4AAC20F1B101B000[1]> but was:<...018B4AAC20F1B101B000[0]>
```
After: `mvn -pl proxy -Dtest=SendMessageActivityTest test` → `Tests run: 14, Failures: 0, Errors: 0, Skipped: 0`. The comma-splittable branch is untouched and still covered by the existing test.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org