Open sergeyevstifeev opened 7 months ago
@sergeyevstifeev I see this cannot be merged because "This branch is out-of-date with the base branch". Are you going to fix this?
@gpratte it doesn't seem like this repo is actively maintained anymore, so I don't really see a point.
I've noticed that consumers spent an inordinate amount of time while idle on topics with no new messages. After setting up a sample consumer on an idle topic I arrived at the same conclusion as some of the commenters on Issue 1556 -
scheduleCheckPendingRequests
is eating all of the CPU. Debugging it further, the issue is:The fix addresses the infinite loop and reduces CPU consumption substantially on idle consumers. 🌱 Additionally, there is no need in
CHECK_PENDING_REQUESTS_INTERVAL
of 10ms if there is not throttling, so this is also removed. I looked at 1532 and I think the fix here should still address the issue that was being addressed in that PR - if there are pending requests we always schedule next check (Math.max(timeUntilUnthrottled, 0)
), so there should be no regression.Fixes #1556