feat(core-api): fallback to inline enrichment when event publishing fails - #517
feat(core-api): fallback to inline enrichment when event publishing fails#517sowndappan5 wants to merge 3 commits into
Conversation
Signed-off-by: sowndappan5 <sowndappan610@gmail.com>
…ails Signed-off-by: sowndappan5 <sowndappan5@gmail.com>
|
Hi @Eldad-Caura and @erni-a, Problem: In deferred mode, if the event broker is down, memory writes succeed but remain permanently unenriched. My Evaluation (n=10): |
|
Hi @Eldad-Caura, Thanks again for reviewing and approving the PR. It looks like the required GitHub Actions workflows are still awaiting maintainer approval, so the CI and DCO checks haven't started yet. Whenever you have a chance, could someone approve the workflows to run? Thanks! |
Summary
This PR introduces a resilient dynamic fallback mechanism for memory enrichment scheduling. When
inline_enrichmentis disabled (deferred/async mode), any unexpected exception raised while publishing the event to the queue is caught and handled gracefully, falling back to synchronous inline enrichment. This guarantees memories are not left unenriched if the broker (e.g. Redis) is temporarily down or unreachable.Related Issue
N/A (Direct Feature Enhancement)
Type of Change
How Has This Been Tested?
Created unit tests in
tests/test_enrich_fallback.pycovering both the successful async publishing path and the fallback path on publish exceptions.Run command:
pytest tests/test_enrich_fallback.py