change ConsumeGoroutineNums max value allowed (#1049)
ConsumeGoroutineNums should allow large values to be set, detail see https://github.com/apache/rocketmq-client-go/pull/883#issuecomment-1527143686
diff --git a/consumer/push_consumer.go b/consumer/push_consumer.go
index 238ab03..50eee98 100644
--- a/consumer/push_consumer.go
+++ b/consumer/push_consumer.go
@@ -614,11 +614,11 @@
}
}
- 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