You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GH-891 - DefaultEventPublicationRegistry now properly unregisters in-progress publication on failed resubmission.
DefaultEventPublicationRegistry.processIncompletePublications(…) now actively unregisters the publication from being considered in progress after completion (either successful or failed). While CompletionRegisteringAdvisor should take care of that on the target listeners we now leave the publications in progress in consistent state independent of the actual target being invoked. Decrease log level of the failed listener invocation as it's not unusual for the listener to fail.
Improved PublicationsInProgress by switching to a concurrent map internally to avoid ConcurrentModificationExceptions in case of multiple threads.
Copy file name to clipboardExpand all lines: spring-modulith-events/spring-modulith-events-core/src/main/java/org/springframework/modulith/events/core/DefaultEventPublicationRegistry.java
+54-4Lines changed: 54 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,10 @@
20
20
importjava.time.Instant;
21
21
importjava.util.Collection;
22
22
importjava.util.HashSet;
23
+
importjava.util.Iterator;
23
24
importjava.util.Optional;
24
25
importjava.util.Set;
26
+
importjava.util.concurrent.ConcurrentHashMap;
25
27
importjava.util.function.Consumer;
26
28
importjava.util.function.Predicate;
27
29
importjava.util.stream.Stream;
@@ -216,9 +218,12 @@ public void processIncompletePublications(Predicate<EventPublication> filter,
Copy file name to clipboardExpand all lines: spring-modulith-events/spring-modulith-events-core/src/test/java/org/springframework/modulith/events/core/DefaultEventPublicationRegistryUnitTests.java
0 commit comments