This is an automated email from the ASF dual-hosted git repository. cserwen 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 af75f77 empty subcribed topic is allowed to start (#969) af75f77 is described below commit af75f77227b046c5d0482f8b71617267f11212d8 Author: Kay Du <kay.du0...@gmail.com> AuthorDate: Fri Apr 28 10:31:20 2023 +0800 empty subcribed topic is allowed to start (#969) Co-authored-by: 筱瑜 <maoyu....@alibaba-inc.com> --- consumer/push_consumer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/consumer/push_consumer.go b/consumer/push_consumer.go index 531a5b6..d8706b0 100644 --- a/consumer/push_consumer.go +++ b/consumer/push_consumer.go @@ -540,7 +540,9 @@ func (pc *pushConsumer) validate() error { } if len(pc.subscribedTopic) == 0 { - return errors.New("number of subscribed topics is 0.") + rlog.Warning("not subscribe any topic yet", map[string]interface{}{ + rlog.LogKeyConsumerGroup: pc.consumerGroup, + }) } if pc.option.ConsumeConcurrentlyMaxSpan < 1 || pc.option.ConsumeConcurrentlyMaxSpan > 65535 {