Skip to content

Commit

Permalink
Lower produce request timeout to 3s
Browse files Browse the repository at this point in the history
  • Loading branch information
weeco committed Nov 4, 2021
1 parent 5fdb775 commit 461321b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e2e/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewService(ctx context.Context, cfg Config, logger *zap.Logger, kafkaSvc *k
kgoOpts = append(kgoOpts, kgo.RequiredAcks(kgo.LeaderAck()))
kgoOpts = append(kgoOpts, kgo.DisableIdempotentWrite())
}
kgoOpts = append(kgoOpts, kgo.ProduceRequestTimeout(cfg.Producer.AckSla))
kgoOpts = append(kgoOpts, kgo.ProduceRequestTimeout(3*time.Second))

// Consumer configs
kgoOpts = append(kgoOpts,
Expand Down Expand Up @@ -166,7 +166,7 @@ func (s *Service) Start(ctx context.Context) error {
go s.startConsumeMessages(ctx, initCh)

// Produce an init message until the consumer received at least one fetch
initTicker := time.NewTicker(1000 * time.Second)
initTicker := time.NewTicker(1 * time.Second)
isInitialized := false
// send first init message immediately
sendInitMessage(ctx, s.client, s.config.TopicManagement.Name)
Expand Down

0 comments on commit 461321b

Please sign in to comment.