Skip to content

fix(messenger): flush the IndexationRequest spool after each worker message - #229

Merged
damienalexandre merged 2 commits into
masterfrom
issue-207
Sep 26, 2026
Merged

damienalexandre merged 2 commits into
masterfrom
issue-207

Conversation

@lyrixx

@lyrixx lyrixx commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Fix #207

Problem

An IndexationRequest dispatched from a handler running in messenger:consume was never sent: IndexationRequestSpoolSubscriber only flushes the spool on kernel.terminate / console.terminate, and the in-memory transport is reset between two worker messages. The requests were lost silently.

Fix

IndexationRequestSpoolSubscriber now also listens to:

  • WorkerMessageHandledEvent: flush the spool (same logic as onTerminate());
  • WorkerMessageFailedEvent: reject the requests queued while handling the failed message, so they are not sent along with the next handled message. The failed message will be retried (or sent to the failure transport) and will dispatch them again.

The second point is a design choice, feedback welcome.

Test plan

  • Two new functional tests in MemoryQueuingFunctionalTest
  • CI

lyrixx and others added 2 commits September 25, 2026 10:10
…essage

IndexationRequest dispatched while handling a message in a Messenger worker
were never sent: the spool was only flushed on kernel/console terminate, and
the in-memory transport is reset between messages.

Fix #207
@damienalexandre
damienalexandre merged commit da99790 into master Sep 26, 2026
11 checks passed
@damienalexandre
damienalexandre deleted the issue-207 branch September 26, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IndexationRequest dispatched by async message handler are not handled by IndexationRequestSpoolSubscriber

2 participants