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

PersistentApplicationEventMulticaster.resubmitIncompletePublications does not update the event as completed #1049

Open
dustinsand opened this issue Feb 4, 2025 · 2 comments
Assignees
Labels
in: event publication registry Event publication registry meta: waiting for feedback Waiting for feedback of the original reporter

Comments

@dustinsand
Copy link

We have encountered an issue where our scheduled retry job for failed events is successfully resubmitting the event for publication using PersistentApplicationEventMulticaster.resubmitIncompletePublications, the event is handled by the event listener successfully, but the event completion_date in the event_publication table is not set.

We have identified the root cause, the JSON field order changed in the release after the initial failed events were created. The JSON field values are identical and the JSON has a unique field to make each event unique. Modulith deserializes the event successfully, resubmits it for publication, but the EventPublicationRepository.markCompleted does not update the event's completion_date column due to the JSON text not being identical because of serialization differences with the field order (nothing else is different, just field order).

Modulith 1.3 added a feature which would fix this issue, Completing Event Publications by Identifier, by using the publication id instead of the JSON text match to update the completed event.

Can the completing event by identifier also used for the flow used by PersistentApplicationEventMulticaster.resubmitIncompletePublications? I believe this would fix the issue.

Specifically, this is the method in Modulith 1.3 I believe would fix the issue

EventPublicationRepository.markCompleted(UUID identifier, Instant completionDate)

Would it be possible for PersistentApplicationEventMulticaster.resubmitIncompletePublications to be updated to use the new Completing Event Publications by Identifier?

@odrotbohm
Copy link
Member

This should be fixed with the changes made for GH-1056. Would you mind giving the 1.4 snapshots a try?

@odrotbohm odrotbohm added in: event publication registry Event publication registry meta: waiting for feedback Waiting for feedback of the original reporter labels Feb 24, 2025
@odrotbohm odrotbohm self-assigned this Feb 24, 2025
@dustinsand
Copy link
Author

I ran into an issue verifying the fix in my constrained environment because we are not allowed to access snapshots. I'm continuing to look for a workaround to test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: event publication registry Event publication registry meta: waiting for feedback Waiting for feedback of the original reporter
Projects
None yet
Development

No branches or pull requests

2 participants