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

Allow differentiating between failed event publications and ones that are currently processed #663

Open
cmetzlerhg opened this issue Jun 18, 2024 · 2 comments
Labels
in: event publication registry Event publication registry type: enhancement Major enhanvements, new features

Comments

@cmetzlerhg
Copy link

Hi,

we ran into another issue with multiple nodes (using jpa event publication), where one node tries to handle the event via the local application event publishing mechanism, whilst the other node tries to replay incompleted event (because it has not been marked as completed yet).
For now we mitigated the issue, by only replying events older than x seconds to avoid the same event handler to be triggered twice on different nodes.
I wonder, if it would be useful that any event handler either keeps a lock in the database while processing an event or uses a state field (wether the event is currently being processed).

What would be your recommendation?

@odrotbohm
Copy link
Member

This is indeed a current limitation, also evident from the fact that IncompleteEventPublications exposing a ….resubmitIncompletePublicationsOlderThan(Duration). We have plans to overhaul the event processing infrastructure to explicitly mark publications as failed that couldn't be processed.

@odrotbohm odrotbohm changed the title Multiple server nodes with Spring Modulith Allow differentiating between failed event publications and ones that are currently processed Jun 18, 2024
@odrotbohm odrotbohm added in: event publication registry Event publication registry type: enhancement Major enhanvements, new features labels Jun 18, 2024
@cmetzlerhg
Copy link
Author

Thanks for your quick reply, I think for now, we are fine with using an offset. Whenever there is a solution we're happy to adopt it.

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 type: enhancement Major enhanvements, new features
Projects
None yet
Development

No branches or pull requests

2 participants