-
Notifications
You must be signed in to change notification settings - Fork 137
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
Drain mode: PC keeps polling messages after closeDrainFirst #552
Comments
Here is my humble attempt to write a test for this issue and a possible fix: dannpopescu@4c17e89 Some mentions:
|
@dannpopescu is this still an issue? I am considering using PC and this could be a showstopper |
@antonmos there's no fix for it yet. In the meantime I've found another bug in this flow: if there are in-flight messages and the internal PC queue is empty, when you close the PC in I've created a repo with some tests if anyone is interested: https://github.com/dannpopescu/parallel-consumer-shutdown-poc |
@dannpopescu, @antonmos - We just released 0.5.2.6 build of PC - this and #559 are both fixed in it. The issue with inflight messages getting killed by pool shutdown when closing in DRAIN mode is addressed by those fixes as well - as on transition to CLOSING - the inflight messages will be allowed to complete (up to shutdown timeout). |
Hello everyone. First of all, thanks for building this library.
I want to discuss something that I stumbled upon while experimenting with different modes to shutdown the PC. From my tests, the
DRAIN
mode doesn't work as expected: it keeps polling the messages even after callingcloseDrainFirst
.I'm using the version
0.5.2.4
. Below are some logs from my tests. I've posted full logs athttps://justpaste.it/cj138
.First I initialize the PC:
It polls 300 messages in batches of 10 then pauses the polling and processes for a while:
Then comes the instruction to close and drain:
But the PC continues to poll:
From what I understand at the moment, once the PC is set to DRAINING, the partitions assigned to the consumer are paused. My assumption currently is that the
BrokerPollSystem
resumes the partitions inmanagePauseOfSubscription()
because the implementation takes into consideration only the throttling mechanism and doesn't look at the draining state:What do you think, is there a bug or there's something wrong with my setup?
The text was updated successfully, but these errors were encountered: