apache / apache/rocketmq-client-go
pull mode consume history message very slow
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 445
- PR merge metrics
- No merged PRs in 30d
Description
First I produce 1k msg to broker, then I run the examples/consumer/pull/pull.go code with minor changes (only start one goroutine to consume), just like
```go
for i := 0; i < 1; i++ {
go func() {
for {
pull()
}
}()
}
```
There the consume rate is very slow, every pull will block about 25s. But if modify the suspend param to false at https://github.com/apache/rocketmq-client-go/blob/f4875c1bbca66be050ec71359a8b447e0b63e743/consumer/pull_consumer.go#L445 the consume rate comes fast.
Contributor guide
Research direction
Start by reproducing the issue with examples/consumer/pull/pull.go and 1,000 broker messages, then inspect consumer/pull_consumer.go around line 445. Compare the pull behavior with suspend enabled and disabled, and consider the work complete when history consumption no longer incurs the reported 25-second delay under the stated example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100