Ver código fonte

Revise message re: code review

Burke Libbey 12 anos atrás
pai
commit
27bf0b4e67
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      consumer.go

+ 2 - 2
consumer.go

@@ -74,8 +74,8 @@ func NewConsumer(client *Client, topic string, partition int32, group string, co
 		config = new(ConsumerConfig)
 	}
 
-	if config.MaxWaitTime == 0 && config.MinFetchSize == 0 && config.DefaultFetchSize == 0 {
-		log.Println("ConsumerConfig{MaxWaitTime, MinFetchSize, DefaultFetchSize} are all set to 0. This causes busy-looping when no events are available. You should seriously consider changing these values. MinFetchSize should be at least 1 in almost all scenarios.")
+	if config.MaxWaitTime < 100 {
+		log.Println("ConsumerConfig{MaxWaitTime} is very low. This can cause high CPU and network usage. Consider increasing this value.")
 	}
 
 	if config.DefaultFetchSize < 0 {