We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b1c833 commit 1d5a83bCopy full SHA for 1d5a83b
reader.go
@@ -24,6 +24,13 @@ const (
24
defaultCommitRetries = 3
25
)
26
27
+const (
28
+ // defaultFetchMinBytes of 1 byte means that fetch requests are answered as
29
+ // soon as a single byte of data is available or the fetch request times out
30
+ // waiting for data to arrive.
31
+ defaultFetchMinBytes = 1
32
+)
33
+
34
var (
35
errOnlyAvailableWithGroup = errors.New("unavailable when GroupID is not set")
36
errNotAvailableWithGroup = errors.New("unavailable when GroupID is set")
@@ -581,7 +588,7 @@ func NewReader(config ReaderConfig) *Reader {
581
588
}
582
589
583
590
if config.MinBytes == 0 {
584
- config.MinBytes = config.MaxBytes
591
+ config.MinBytes = defaultFetchMinBytes
585
592
586
593
587
594
if config.MaxWait == 0 {
0 commit comments