Commit Graph

12 Commits

Author SHA1 Message Date
Oliver Drotbohm
42a9c48e80 GH-863 - Add convenience method for creating a default EventExternalizationConfiguration. 2024-10-08 15:09:12 +02:00
Oliver Drotbohm
f00e5dc0eb GH-858 - Polishing. 2024-10-06 12:44:10 +02:00
Oliver Drotbohm
d510697afa GH-858 - Allow customizing transaction propagation on @ApplicationModuleListener. 2024-10-06 12:44:01 +02:00
Oliver Drotbohm
9a908ee275 GH-754 - Rename EventPublication.isPublicationCompleted() to ….isCompleted(). 2024-08-07 21:25:58 +02:00
Oliver Drotbohm
60de42bf6c GH-518 - Support for conditions on @ApplicationModuleListener. 2024-03-14 18:07:43 +01:00
Oliver Drotbohm
c32227bdfb GH-463 - Update copyright headers. 2024-01-17 19:45:40 +01:00
Oliver Drotbohm
0ae19fb301 GH-353 - Improvements in internal event externalization APIs.
DelegatingEventExternalizer.externalize(…) flavors now return a CompletableFuture to allow the target APIs to use asynchronous message sending and to transparently return a result from those invocations.
2023-11-01 23:48:06 +01:00
Oliver Drotbohm
e4190c47aa GH-346 - Allow explicit declaration of identifier in @ApplicationModuleListener. 2023-11-01 23:48:04 +01:00
Oliver Drotbohm
576b8f5074 GH-342 - Allow disabling event externalization.
We now expose spring.modulith.events.externalization.enabled that can be set to false to disable the event externalization completely. Useful in test cases, for example.
2023-10-23 12:22:42 +02:00
Oliver Drotbohm
db1c2b813e GH-322 - Move @ApplicationModuleListener into ….modulith.events in spring-modulith-events-api. 2023-10-15 17:13:45 +02:00
Oliver Drotbohm
9b0062f354 GH-248 - Support to automatically externalize events.
We now allow externalizing application events to a variety of message brokers through the addition of Spring Modulith modules for Kafka, AMQP and JMS to a user project's classpath. Which events shall be externalized and how they're supposed to be routed to the message broker can be configured through either annotations or via a configuration API declared as Spring bean.

In case Jackson is on the classpath, we also add auto-configuration to use a Boot-configured ObjectMapper instance with the corresponding message broker client APIs to properly serialize and deserialize messages to JSON.
2023-09-07 16:29:10 +02:00
Oliver Drotbohm
971a143436 GH-294 - Introduce user API to deal with completed and incomplete event publications.
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.
2023-09-04 15:24:37 +02:00