[Scheduler] Recover pending RecurringMessages after consumer stops midway#64335
Merged
nicolas-grekas merged 1 commit intoMay 23, 2026
symfony:6.4symfony/symfony:6.4from
ousamabenyounes:fix/issue-62496ousamabenyounes/symfony:fix/issue-62496Copy head branch name to clipboard
Merged
[Scheduler] Recover pending RecurringMessages after consumer stops midway#64335nicolas-grekas merged 1 commit intosymfony:6.4symfony/symfony:6.4from ousamabenyounes:fix/issue-62496ousamabenyounes/symfony:fix/issue-62496Copy head branch name to clipboard
nicolas-grekas merged 1 commit into
symfony:6.4symfony/symfony:6.4from
ousamabenyounes:fix/issue-62496ousamabenyounes/symfony:fix/issue-62496Copy head branch name to clipboard
Conversation
1fa582b to
ebc7829
Compare
Member
|
Thank you @ousamabenyounes. |
This was referenced May 27, 2026
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When the consumer stops after yielding part of the messages due at one trigger time (e.g.
messenger:consume --limit 1, SIGINT, fatal error), the next process rebuilt the heap with each trigger's run strictly after the checkpointed time, silently dropping the un-yielded messages at that time.On the first heap build of a new instance with a non-warmup checkpoint, probe triggers one microsecond before
$lastTimeso they re-emit their entries due at$lastTime. The existing skip logic ($time == $lastTime && $index <= $lastIndex) then filters out already-yielded indices and lets the un-processed remainder through.Reproduces with two
RecurringMessage::every('30 seconds', …)consumed under--limit 1: "first" runs on every restart, "second" never runs without this patch.TDD verification
OK (1 test, 3 assertions)MessageGeneratorTest:OK (18 tests, 81 assertions)OK (144 tests, 773 assertions)— no regression.