Skip to content

Commit

Permalink
feat: able to inject cronsumer producer batch size and timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdulsametileri committed Oct 24, 2024
1 parent 9f7cd38 commit 2693d53
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions consumer_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ func (cfg *ConsumerConfig) newCronsumerConfig() *kcronsumer.Config {
RetentionTime: cfg.Reader.RetentionTime,
},
Producer: kcronsumer.ProducerConfig{
Balancer: cfg.RetryConfiguration.Balancer,
Brokers: cfg.RetryConfiguration.Brokers,
Balancer: cfg.RetryConfiguration.Balancer,
Brokers: cfg.RetryConfiguration.Brokers,
BatchSize: cfg.RetryConfiguration.ProducerBatchSize,
BatchTimeout: cfg.RetryConfiguration.ProducerBatchTimeout,
},
LogLevel: lcronsumer.Level(cfg.RetryConfiguration.LogLevel),
}
Expand Down Expand Up @@ -227,6 +229,8 @@ type RetryConfiguration struct {
SkipMessageByHeaderFn SkipMessageByHeaderFn
Concurrency int
QueueCapacity int
ProducerBatchSize int
ProducerBatchTimeout time.Duration
}

type BatchConfiguration struct {
Expand Down

0 comments on commit 2693d53

Please sign in to comment.