Skip to content

Commit

Permalink
update max attempts default value.
Browse files Browse the repository at this point in the history
  • Loading branch information
halilkocaoz committed Oct 20, 2023
1 parent d508e59 commit a1e6b2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Check out on [go-dcp](https://github.com/Trendyol/go-dcp#configuration)
| `kafka.producerBatchSize` | integer | no | 2000 | Maximum message count for batch, if exceed flush will be triggered. |
| `kafka.producerBatchBytes` | 64 bit integer | no | 10485760 | Maximum size(byte) for batch, if exceed flush will be triggered. |
| `kafka.producerBatchTimeout` | time.duration | no | 1 nano second | Time limit on how often incomplete message batches will be flushed. |
| `kafka.producerMaxAttempts` | int | no | 10 | Limit on how many attempts will be made to deliver a message. |
| `kafka.producerMaxAttempts` | int | no | math.MaxInt | Limit on how many attempts will be made to deliver a message. |
| `kafka.producerBatchTickerDuration` | time.Duration | no | 10s | Batch is being flushed automatically at specific time intervals for long waiting messages in batch. |
| `kafka.readTimeout` | time.Duration | no | 30s | segmentio/kafka-go - Timeout for read operations |
| `kafka.writeTimeout` | time.Duration | no | 30s | segmentio/kafka-go - Timeout for write operations |
Expand Down
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package config

import (
"math"
"time"

"github.com/Trendyol/go-dcp/config"
Expand Down Expand Up @@ -71,7 +72,7 @@ func (c *Connector) ApplyDefaults() {
}

if c.Kafka.ProducerMaxAttempts == 0 {
c.Kafka.ProducerMaxAttempts = 10
c.Kafka.ProducerMaxAttempts = math.MaxInt
}

if c.Kafka.ProducerBatchTimeout == 0 {
Expand Down

0 comments on commit a1e6b2a

Please sign in to comment.