feat: add LoggingListenerDispatcher and promote recoverStuck* onto store interfaces - #11
Merged
jcviljoen merged 1 commit intoMay 17, 2026
Conversation
…ore interfaces LoggingListenerDispatcher logs every failed dispatch via PSR-3 with event + listener context and rethrows so upstream redelivery still triggers — gives operators per-attempt visibility into retries that SequentialRedeliveryProcessor previously exhausted silently. recoverStuckEvents() and recoverStuckRedeliveries() move from the SQL classes to their respective interfaces so recovery jobs can type-hint against the contract instead of instanceof-checking down. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jcviljoen
deleted the
add-logging-dispatcher-and-update-event-store-contracts
branch
May 17, 2026 20:56
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.
Summary
LoggingListenerDispatcher— new readonly decorator that logs every failed dispatch attempt at error level (PSR-3) with['exception', 'event', 'listener']context, then rethrows so upstream redelivery scheduling/rescheduling still triggers. Wrap outsideDefaultListenerDispatcherso itsignoredExceptionsnever reach the logger; wrap insideRedeliveringListenerDispatcher(event path) andSequentialRedeliveryProcessor(redelivery path) so every attempt is logged. Closes the visibility gap whereSequentialRedeliveryProcessorwould exhaust retries silently.recoverStuckEvents()/recoverStuckRedeliveries()promoted onto the interfaces — moved fromSqlEventStore/SqlRedeliveryStoreup toEventStore/RedeliveryStore. Recovery jobs can now type-hint against the interface instead ofinstanceof-checking down to the concrete SQL class.InMemory*implementations satisfy the contract (events: returns0; redeliveries: resets stuckDispatchingrows viaqueueForImmediateRetry()).SqlEventStore::recoverStuck*references to the interface, refreshed Custom EventStore example.🤖 Generated with Claude Code