Skip to content

Commit

Permalink
Merge pull request #53 from redpanda-data/nv/repeater-validate-group-…
Browse files Browse the repository at this point in the history
…name

repeater: validate group name
  • Loading branch information
nvartolomei authored Apr 10, 2024
2 parents 8f4fdb7 + 96366a1 commit e100d9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
9 changes: 3 additions & 6 deletions cmd/kgo-repeater/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,9 @@ func main() {
topicsList = strings.Split(*topic, ",")
}

wConfig := worker.NewWorkerConfig(
"kgo", *brokers, *trace, topicsList[0], *linger, *maxBufferedRecords, *useTransactions, *compressionType, *compressiblePayload, *username, *password, *enableTls)
opts := wConfig.MakeKgoOpts()
opts = append(opts, []kgo.Opt{
kgo.ProducerBatchMaxBytes(1024 * 1024),
}...)
if *group == "" {
panic("A consumer group must be provided via the -group flag")
}

dataInFlightPerWorker := (*initialDataMb * 1024 * 1024) / uint64(*workers)

Expand Down
4 changes: 0 additions & 4 deletions pkg/worker/repeater/repeater_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,6 @@ func (v *Worker) Init() {
kgo.ConsumerGroup(v.config.Group),
}...)

if v.config.Group != "" {
opts = append(opts, kgo.ConsumerGroup(v.config.Group))
}

client, err := kgo.NewClient(opts...)
util.Chk(err, "unable to initialize client: %v", err)
v.client = client
Expand Down

0 comments on commit e100d9f

Please sign in to comment.