Introduce a new spring-modulith-events-api artifact to contain types that are supposed to be used by application code to deal with event publications. `EventPublication` was moved into that artifact and got everything non infrastructure related extracted from it's previous incarnation. That in turn has been renamed to `TargetEventPublication`. `CompletedEventPublications` exposes API to allow purging completed publications either by a given predicate or age (in `Duration`). The interface is implemented by `DefaultEventPublicationRegistry` and thus subject for dependency injection into user code. It primarily delegates to the corresponding methods on `EventPublicationRepository` adapting the given `Duration`s to the `Clock` instance already held internally. `IncompleteEventPublications` allows triggering the re-submission of incomplete publications by the same criteria as `CEP`. The interface is implemented by `PersistentApplicationEventMulticaster` and this subject for dependency injection into user code. `EventPublicationRepository` now also allows publications to be deleted by identifiers. The existing implementations have been adapted and batch the requests for every 100 identifiers to prevent a list too large to run into limitations of the underlying data store. Polished transactional metadata declaration in JPA- and MongoDB-based repository implementations. Tightened nullability expressions here and there.
87 lines
1.9 KiB
XML
87 lines
1.9 KiB
XML
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>org.springframework.modulith</groupId>
|
|
<artifactId>spring-modulith</artifactId>
|
|
<version>1.1.0-SNAPSHOT</version>
|
|
<relativePath>../pom.xml</relativePath>
|
|
</parent>
|
|
|
|
<artifactId>spring-modulith-events</artifactId>
|
|
<packaging>pom</packaging>
|
|
|
|
<name>Spring Modulith - Events</name>
|
|
|
|
<modules>
|
|
<module>spring-modulith-events-api</module>
|
|
<module>spring-modulith-events-core</module>
|
|
<module>spring-modulith-events-jpa</module>
|
|
<module>spring-modulith-events-jdbc</module>
|
|
<module>spring-modulith-events-mongodb</module>
|
|
<module>spring-modulith-events-jackson</module>
|
|
</modules>
|
|
|
|
<profiles>
|
|
|
|
<profile>
|
|
|
|
<id>events-default</id>
|
|
|
|
<activation>
|
|
<activeByDefault>true</activeByDefault>
|
|
</activation>
|
|
|
|
<modules>
|
|
<module>spring-modulith-events-tests</module>
|
|
</modules>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>prepare-release</id>
|
|
|
|
<modules>
|
|
<module>spring-modulith-events-tests</module>
|
|
</modules>
|
|
|
|
</profile>
|
|
|
|
<!-- Needs to be declared to disable default profile -->
|
|
<profile>
|
|
<id>sonatype</id>
|
|
</profile>
|
|
|
|
</profiles>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-engine</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.mockito</groupId>
|
|
<artifactId>mockito-junit-jupiter</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.assertj</groupId>
|
|
<artifactId>assertj-core</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>ch.qos.logback</groupId>
|
|
<artifactId>logback-classic</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
</project>
|