You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by we...@apache.org on 2021/07/15 07:17:03 UTC

[rocketmq-client-go] branch master updated: make consumeMessageBatchMaxSize default value consistent with java client (#660)

This is an automated email from the ASF dual-hosted git repository.

wenfeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new a7a7387  make consumeMessageBatchMaxSize default value consistent with java client (#660)
a7a7387 is described below

commit a7a73875c91957ef595544cbaef3aa3dd1e11657
Author: 张旭 <ma...@gmail.com>
AuthorDate: Thu Jul 15 15:16:51 2021 +0800

    make consumeMessageBatchMaxSize default value consistent with java client (#660)
    
    Co-authored-by: zhangxu16 <zh...@xiaomi.com>
---
 consumer/push_consumer.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/consumer/push_consumer.go b/consumer/push_consumer.go
index efd373f..ec44a1e 100644
--- a/consumer/push_consumer.go
+++ b/consumer/push_consumer.go
@@ -501,7 +501,7 @@ func (pc *pushConsumer) validate() {
 
 	if pc.option.ConsumeMessageBatchMaxSize < 1 || pc.option.ConsumeMessageBatchMaxSize > 1024 {
 		if pc.option.ConsumeMessageBatchMaxSize == 0 {
-			pc.option.ConsumeMessageBatchMaxSize = 512
+			pc.option.ConsumeMessageBatchMaxSize = 1
 		} else {
 			rlog.Error("option.ConsumeMessageBatchMaxSize out of range [1, 1024]", nil)
 		}