Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Not notify long polling request when pop orderly consume blocked #8592

Closed
1 task done
lizhimins opened this issue Aug 28, 2024 · 0 comments · Fixed by #8593
Closed
1 task done

[Enhancement] Not notify long polling request when pop orderly consume blocked #8592

lizhimins opened this issue Aug 28, 2024 · 0 comments · Fixed by #8593

Comments

@lizhimins
Copy link
Member

Before Creating the Enhancement Request

  • I have confirmed that this should be classified as an enhancement rather than a bug/feature.

Summary

当顺序消息消费阻塞时,相同的队列又有新的消息写入,此时 rest num 大于 0 造成了 pop message processor 又重新唤醒长轮询。此时长轮询在 process 逻辑反复处理,造成有堆积消息但无法消费的情况。由于此时是顺序消费,服务端没有收到之前消息的 ack,因此消费延迟是符合预期的,只是 cpu 使用率会偏高,可以通过优化减少反复唤起长轮询。

When order message consumption is blocked, new messages are written to the same queue, and the rest num is greater than 0, causing the pop message processor to wake up the long polling again. Long polling is repeatedly processed in the process logic, resulting in a situation where there are lag messages that cannot be consumed. Due to the order consumption at this time, the broker did not receive the ACK of the previous pop message, so the consumption delay is expected. However, the CPU usage will be high, and optimization can be used to reduce the repeated triggering of long polling.

Motivation

减少反复唤起长轮询造成的 CPU 使用率高。

Reduce the high CPU usage caused by repeatedly invoking long polling

Describe the Solution You'd Like

Reduce the high CPU usage caused by repeatedly invoking long polling

Describe Alternatives You've Considered

not add extra rest num here

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant