Skip to content

Commit

Permalink
change ConsumeGoroutineNums max value allowed (#1049)
Browse files Browse the repository at this point in the history
ConsumeGoroutineNums should allow large values to be set, detail see #883 (comment)
  • Loading branch information
twz915 committed May 9, 2023
1 parent 1d86ea6 commit 8c4e388
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions consumer/push_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,11 +614,11 @@ func (pc *pushConsumer) validate() error {
}
}

if pc.option.ConsumeGoroutineNums < 1 || pc.option.ConsumeGoroutineNums > 1000 {
if pc.option.ConsumeGoroutineNums < 1 || pc.option.ConsumeGoroutineNums > 100000 {
if pc.option.ConsumeGoroutineNums == 0 {
pc.option.ConsumeGoroutineNums = 20
} else {
return errors.New("option.ConsumeGoroutineNums out of range [1, 1000]")
return errors.New("option.ConsumeGoroutineNums out of range [1, 100000]")
}
}
return nil
Expand Down

0 comments on commit 8c4e388

Please sign in to comment.