Skip to content
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

Question: EventListeners and last processed events. #152

Open
phillipbaird opened this issue Feb 6, 2025 · 0 comments
Open

Question: EventListeners and last processed events. #152

phillipbaird opened this issue Feb 6, 2025 · 0 comments

Comments

@phillipbaird
Copy link

In the Courses example I noticed the read model tracks the last processed event in the course table. Each of the sql statements for the event handlers check event_id < $2 so that events are not reapplied.

My understanding is the last event processed by an event listener is stored in the event_listener table. The event listener uses this value to prevent reprocessing an event that has already been successfully handled.

Is my understanding correct?

If so, why is the event_id also being stored in the read model on the course table in the Courses example? Is this overkill or is there a reason for it that I'm not understanding?

Thanks.

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

No branches or pull requests

1 participant