You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by di...@apache.org on 2019/09/23 09:20:23 UTC

[rocketmq-client-go] branch native updated: [ISSUE #201]Change default consumer option to Clustering (#208)

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

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


The following commit(s) were added to refs/heads/native by this push:
     new 7b049f5  [ISSUE #201]Change default consumer option to Clustering (#208)
7b049f5 is described below

commit 7b049f586709ae7169f09d12ed02ef6c51ed8960
Author: dinglei <li...@163.com>
AuthorDate: Mon Sep 23 17:20:19 2019 +0800

    [ISSUE #201]Change default consumer option to Clustering (#208)
    
    * Change default consumer option to Clusting
    
    * Add Consumer Model set to test Start.
---
 consumer/option.go             | 1 +
 consumer/push_consumer_test.go | 1 +
 2 files changed, 2 insertions(+)

diff --git a/consumer/option.go b/consumer/option.go
index d1e6c31..0e8a608 100644
--- a/consumer/option.go
+++ b/consumer/option.go
@@ -113,6 +113,7 @@ func defaultPushConsumerOptions() consumerOptions {
 		MaxTimeConsumeContinuously: time.Duration(60 * time.Second),
 		RebalanceLockInterval:      20 * time.Second,
 		MaxReconsumeTimes:          -1,
+		ConsumerModel:              Clustering,
 		AutoCommit:                 true,
 	}
 	opts.ClientOptions.GroupName = "DEFAULT_CONSUMER"
diff --git a/consumer/push_consumer_test.go b/consumer/push_consumer_test.go
index 2f4dbeb..764de4c 100644
--- a/consumer/push_consumer_test.go
+++ b/consumer/push_consumer_test.go
@@ -36,6 +36,7 @@ func TestStart(t *testing.T) {
 		c, _ := NewPushConsumer(
 			WithGroupName("testGroup"),
 			WithNameServer([]string{"127.0.0.1:9876"}),
+			WithConsumerModel(BroadCasting),
 		)
 
 		ctrl := gomock.NewController(t)