I have enabled spring.modulith.events.republish-outstanding-events-on-restart = true
Events are registered in event_publication and remain with completion_date = null
When application restarts I see logged message:
2026-02-13T09:03:46.166+02:00 DEBUG 43792 --- [send] [omcat-handler-1] .s.m.e.c.DefaultEventPublicationRegistry : Looking up incomplete event publications …
2026-02-13T09:03:46.383+02:00 DEBUG 43792 --- [send] [omcat-handler-1] .s.m.e.c.DefaultEventPublicationRegistry : 16 publications found.
But events listeners are not called. After checking the sources I see that there is a call in /DefaultEventPublicationRegistry.java to processPublications(publications, filter, consumer); which when followed leads to:
private void processPublications(Collection<TargetEventPublication> publications, Predicate<EventPublication> filter,
Consumer<TargetEventPublication> consumer) {
publications.stream() //
.filter(filter) //
.forEach(it -> {
I assume that the filter is not passed by, because there are no logs for LOGGER.debug("Resubmitting event publication %s.".formatted(it.getIdentifier()));
I also tried calling publications.resubmitIncompletePublications(ep -> true); from a controller after the app fully started, but events listeners are not called again.
I am using JPA to store publications. The database table exists and is populated with new events. Fields completion_attempts, last_resubmission_date and status are empty. Enabling SQL log shows no attempts to update them (only the select query).
When I tried to change listener_id I see error logs that the relevant listener is not found, which means code properly selects rows and determines relevant listener. but the listener itself is not triggered (no debug output nor job is done from inside of it).
I would highly appreciate any help in how to republish all events after application restart.
I have enabled
spring.modulith.events.republish-outstanding-events-on-restart = trueEvents are registered in
event_publicationand remain withcompletion_date = nullWhen application restarts I see logged message:
But events listeners are not called. After checking the sources I see that there is a call in
/DefaultEventPublicationRegistry.javatoprocessPublications(publications, filter, consumer);which when followed leads to:I assume that the filter is not passed by, because there are no logs for
LOGGER.debug("Resubmitting event publication %s.".formatted(it.getIdentifier()));I also tried calling
publications.resubmitIncompletePublications(ep -> true);from a controller after the app fully started, but events listeners are not called again.I am using JPA to store publications. The database table exists and is populated with new events. Fields
completion_attempts,last_resubmission_dateandstatusare empty. Enabling SQL log shows no attempts to update them (only the select query).When I tried to change
listener_idI see error logs that the relevant listener is not found, which means code properly selects rows and determines relevant listener. but the listener itself is not triggered (no debug output nor job is done from inside of it).I would highly appreciate any help in how to republish all events after application restart.