-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop ack-ing unprocessed pubsub messages and log warnings #2
base: master
Are you sure you want to change the base?
Conversation
} | ||
$handledMessages[] = $message; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's plenty of service that don't and won't get a handler for the message, meaning message will never get acked and will be retried many times. Don't think that's the aim here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you're right. The goal of this PR is to stop ack-ing the pubsub messages for the events that are registered in handlers
array of app-events.php
but does not have the relevant proto class in mappings
array of the same file. But I just noticed that I need to change the AppEventFactory for that, too. Will add changes in a minute. I'll see what I can change to reach that goal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a bit more change to make that happen and I fall into the trap of updating everything unrelated but necessary.
With the latest changes, I will publish this as a new major version. |
The problem with current code is that if we forget to add a proto class to mappings, but add the event handler, the relevant pubsub messages will be discarded. That's not desirable. We want to not acknowledge the messages if the event is unprocessable.