NAND86 opened a new pull request #643: URL: https://github.com/apache/rocketmq-client-go/pull/643
## What is the purpose of the change fix crash on selecting queue. ## Brief changelog https://github.com/golang/go/blob/a7e16abb22f1b249d2691b32a5d20206282898f2/src/math/rand/rand.go#L7-L20 The default Source is safe for concurrent use by multiple goroutines, but Sources created by NewSource are not. 如上所述,math/rand中通过NewSource创建的rand方法不是线程安全的。多协程发送消息时,不加锁的情况下同时select queue会因数组越界导致panic。 panic如下: panic: runtime error: index out of range [-1] -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
