You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/02/09 16:26:32 UTC
[GitHub] jonnxu opened a new pull request #95: [Issue#94] Support send batch
message to broker
jonnxu opened a new pull request #95: [Issue#94] Support send batch message to broker
URL: https://github.com/apache/rocketmq-client-cpp/pull/95
## What is the purpose of the change
#94 Support send batch message to broker
## Brief changelog
Add two new APIs:
SendResult send(std::vector<MQMessage>& msgs);
SendResult send(std::vector<MQMessage>& msgs, const MQMessageQueue& mq);
## Verifying this change
**Producer send one batch message:**
./bin/BatchProducer -t batch -m 1 -c test2222 -T 1 -n 127.0.0.1:9876 -g g1 nameserver: 101.132.96.164:9876
topic: batch
groupname: g1
produce content: test2222msgbody for test
msg count: 1
thread count: 1
tps_thread_ is null
send RT more than: 2807 ms with msgid:
per msg time: 2807ms
========================finished==============================
**consumer receive three message:**
./bin/PushConsumer -t batch -n 127.0.0.1:9876 -g g0 -m 10000 -T 1
nameserver: 127.0.0.1:9876
topic: batch
groupname: g0
produce content: msgbody for test
msg count: 10000
thread count: 1
tps_thread_ is null
msg: MessageExt [queueId=0, storeSize=196, queueOffset=48, sysFlag=0, bornTimestamp=1549729233501, bornHost=127.0.0.1, storeTimestamp=1549729234903, storeHost=127.0.0.1, msgId=730010AC000083060000E06492330100, commitLogOffset=365601006, bodyCRC=1949078420, reconsumeTimes=0, preparedTransactionOffset=0, Message [topic=batch, flag=0, tag=*]]
body: test2222msgbody for test
TAGS : *
UNIQ_KEY : 730010AC000083060000E06492330100
WAIT : true
property1 : value1
msg: MessageExt [queueId=0, storeSize=213, queueOffset=49, sysFlag=0, bornTimestamp=1549729233501, bornHost=127.0.0.1, storeTimestamp=1549729234903, storeHost=127.0.0.1, msgId=730010AC000083060000E06492330200, commitLogOffset=365601202, bodyCRC=1949078420, reconsumeTimes=0, preparedTransactionOffset=0, Message [topic=batch, flag=0, tag=*]]
body: test2222msgbody for test
TAGS : *
UNIQ_KEY : 730010AC000083060000E06492330200
WAIT : true
property1 : value1
property2 : value2
msg: MessageExt [queueId=0, storeSize=230, queueOffset=50, sysFlag=0, bornTimestamp=1549729233501, bornHost=127.0.0.1, storeTimestamp=1549729234903, storeHost=127.0.0.1, msgId=730010AC000083060000E06492330300, commitLogOffset=365601415, bodyCRC=1949078420, reconsumeTimes=0, preparedTransactionOffset=0, Message [topic=batch, flag=0, tag=*]]
body: test2222msgbody for test
TAGS : *
UNIQ_KEY : 730010AC000083060000E06492330300
WAIT : true
property1 : value1
property2 : value2
property3 : value3
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
- [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when a cross-module dependency exists.
- [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services