From b6673b9a0045ab5dc8253d7f2de0963099314ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oktay=20Ko=C3=A7er?= Date: Tue, 16 Jan 2024 09:37:58 +0300 Subject: [PATCH] feat: add the default value "MessageGroupDuration" to the README.md (#90) --- README.md | 2 +- consumer_config_test.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6782ca1..97a89eb 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,7 @@ under [the specified folder](examples/with-sasl-plaintext) and then start the ap | `commitInterval` | indicates the interval at which offsets are committed to the broker. | 1s | | `rack` | [see doc](https://pkg.go.dev/github.com/segmentio/kafka-go#RackAffinityGroupBalancer) | | | `clientId` | [see doc](https://pkg.go.dev/github.com/segmentio/kafka-go#Dialer) | | -| `messageGroupDuration` | Maximum time to wait for a batch | | +| `messageGroupDuration` | Maximum time to wait for a batch | 1s | | `dial.Timeout` | [see doc](https://pkg.go.dev/github.com/segmentio/kafka-go#Dialer) | no timeout | | `dial.KeepAlive` | [see doc](https://pkg.go.dev/github.com/segmentio/kafka-go#Dialer) | not enabled | | `transport.DialTimeout ` | [see doc](https://pkg.go.dev/github.com/segmentio/kafka-go@#Transport) | 5s | diff --git a/consumer_config_test.go b/consumer_config_test.go index 0821846..ab9c5c5 100644 --- a/consumer_config_test.go +++ b/consumer_config_test.go @@ -26,6 +26,9 @@ func TestConsumerConfig_validate(t *testing.T) { if *cfg.TransactionalRetry != true { t.Fatal("Default Transactional Retry is true") } + if cfg.MessageGroupDuration != time.Second { + t.Fatal("Message Group Duration default value must equal to 1s") + } }) t.Run("Set_Defaults_When_Distributed_Tracing_Enabled", func(t *testing.T) { // Given