Переглянути джерело

Update docs to reflect actual behaviour of MaxWaitTime=0

Burke Libbey 12 роки тому
батько
коміт
6b1f0878c1
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      consumer.go

+ 2 - 1
consumer.go

@@ -28,7 +28,8 @@ type ConsumerConfig struct {
 	// treated as no limit.
 	MaxMessageSize int32
 	// The maximum amount of time (in ms) the broker will wait for MinFetchSize bytes to become available before it
-	// returns fewer than that anyways. The default of 0 is treated as no limit.
+	// returns fewer than that anyways. The default of 0 causes Kafka to return immediately when there are no pending events.
+	// This is rarely desirable behaviour. 500 is a reasonable setting for most use-cases.
 	MaxWaitTime int32
 
 	// The method used to determine at which offset to begin consuming messages.