Fix multi-topics-consumer new topic listeners stuck in paused state #481
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was introduced in v3.7.0 via #447, which contained a change that attempted to fix an issue where a pre-mature ack of a message before a multi-topic subscriber was ready could have caused a crash. To fix the original bug, all multi-topic subscriptions are started with their message listener paused. They later get un-paused once all topics are successfully subscribed and connected. However, on a regex subscription when new topics are discovered, they also start in a paused state, and there's no mechanism to resume them. Hence, they get stuck, and no messages for new topics will be processed.
This change adds a call to resume any new listeners after new topics are added. The fix has been deployed to production in my company's infrastructure and has been confirmed working for a few weeks.
Verifying this change
I could not get the tests to pass with a bare checkout of master no matter what I did. The first few tests were extremely flaky, so I commented them out. The OAuth tests require sudo and wanted to modify my root certificates, which I'm not about to allow, so I commented that out. And the broker tests always segfault in the
BasicEndToEndTest.testUnAckedMessageTrackerEnabledIndividualAck
test. I gave up trying to mess with the tests - I've confirmed the fix works in my environment and our tests pass, so I was satisfied. Just trying to upstream this bugfix...Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
Simple regression bug fix
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)