|
|
@@ -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 {
|