|
@@ -17,17 +17,17 @@ const (
|
|
|
|
|
|
|
|
|
type ConsumerConfig struct {
|
|
|
-
|
|
|
+
|
|
|
DefaultFetchSize int32
|
|
|
|
|
|
-
|
|
|
+
|
|
|
MinFetchSize int32
|
|
|
|
|
|
|
|
|
MaxMessageSize int32
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
MaxWaitTime int32
|
|
|
|
|
|
|
|
@@ -35,9 +35,9 @@ type ConsumerConfig struct {
|
|
|
|
|
|
OffsetValue int64
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
EventBufferSize int
|
|
|
}
|
|
|
|
|
@@ -323,9 +323,10 @@ func (c *Consumer) getOffset(where OffsetTime, retry bool) (int64, error) {
|
|
|
|
|
|
func NewConsumerConfig() *ConsumerConfig {
|
|
|
return &ConsumerConfig{
|
|
|
- DefaultFetchSize: 1024,
|
|
|
+ DefaultFetchSize: 32768,
|
|
|
MinFetchSize: 1,
|
|
|
MaxWaitTime: 250,
|
|
|
+ EventBufferSize: 16,
|
|
|
}
|
|
|
}
|
|
|
|