Skip to content

Commit af75f77

Browse files
NeonToo筱瑜
andauthored
empty subcribed topic is allowed to start (apache#969)
Co-authored-by: 筱瑜 <maoyu.dmy@alibaba-inc.com>
1 parent ded5335 commit af75f77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

consumer/push_consumer.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,9 @@ func (pc *pushConsumer) validate() error {
540540
}
541541

542542
if len(pc.subscribedTopic) == 0 {
543-
return errors.New("number of subscribed topics is 0.")
543+
rlog.Warning("not subscribe any topic yet", map[string]interface{}{
544+
rlog.LogKeyConsumerGroup: pc.consumerGroup,
545+
})
544546
}
545547

546548
if pc.option.ConsumeConcurrentlyMaxSpan < 1 || pc.option.ConsumeConcurrentlyMaxSpan > 65535 {

0 commit comments

Comments
 (0)