qianye1001 opened a new pull request, #10926:
URL: https://github.com/apache/rocketmq/pull/10926
## What changed
- select a gRPC FIFO batch queue using its shared message group, so
consecutive batches in the same FIFO stream use the same queue;
- validate that batch messages have a supported and consistent type, body
encoding, and FIFO message group;
- enforce the encoded batch-size limit and a configurable batch-count limit,
defaulting to 4096;
- pass the complete message list through one Proxy send invocation, which
the lower client encodes into one `SEND_BATCH_MESSAGE` request;
- expand a single Broker batch result into ordered per-message gRPC result
entries;
- add activity-level and protocol-level regression coverage.
## Why
For requests containing more than one message, `SendMessageQueueSelector`
ignored `messageGroup` and used the normal queue-selection pipeline.
Consecutive FIFO batches for the same message group could therefore select
different queues and lose ordering.
The batch validation also did not explicitly enforce the constraints
required by one Broker batch request at the gRPC boundary.
Fixes #10924.
## Validation
JDK 8:
```shell
mvn -pl proxy -am -DskipITs -Dcheckstyle.skip=true -Dspotbugs.skip=true \
-Dtest=org.apache.rocketmq.proxy.grpc.v2.producer.SendMessageActivityTest \
-Dsurefire.failIfNoSpecifiedTests=false test
```
15 tests passed.
```shell
mvn -pl proxy -am -DskipITs -Dcheckstyle.skip=true -Dspotbugs.skip=true \
'-Dtest=org.apache.rocketmq.proxy.service.mqclient.MQClientAPIExtTest#testSendMessageListAsync'
\
-Dsurefire.failIfNoSpecifiedTests=false test
```
The protocol-level test passed and verifies one remoting invocation with
request code `SEND_BATCH_MESSAGE` containing the complete batch.
--
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]