spring-projects / spring-projects/spring-modulith
Thoughts on making the `PersistentApplicationEventMulticaster.invokeTargetListener` method public
@odrotbohm is already working on this.
Since Apr 16, 2024.
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I was wondering if it would be possible to make the PersistentApplicationEventMulticaster.invokeTargetListener(TargetEventPublication) method or some version of it public so that it can be invoked directly.
We have a use case where we built a couple child tables that are associated with the event_publication table to keep track of the number of times an event has been retried. Because of this, we've written our own query to find the list of event publications that need to be resubmitted and would like to be able to invoke the target listener for each one without having a second query be executed. The resubmitIncompletePublications method works, but it's running the findIncompletePublications query each time it's invoked, which is a fairly costly operation given that we already have all of the required data in memory.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.