From af75f77227b046c5d0482f8b71617267f11212d8 Mon Sep 17 00:00:00 2001 From: Kay Du Date: Fri, 28 Apr 2023 10:31:20 +0800 Subject: [PATCH] empty subcribed topic is allowed to start (#969) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 筱瑜 --- 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 531a5b6e..d8706b0f 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 {