Annotation Interface ApplicationModuleListener

An ApplicationModuleListener is an Async Spring TransactionalEventListener that runs in a transaction itself. Thus, the annotation serves as syntactic sugar for the generally recommend setup to integrate application modules via events. The setup makes sure that an original business transaction completes successfully and the integration asynchronously runs in a transaction itself to decouple the integration as much as possible from the original unit of work.

It is advisable that you use these integration listeners in combination with the Spring Modulith Event Publication Registry to make sure that the event publication does not get lost in case of an application or listener failure.

Oliver Drotbohm
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Whether the transaction to be run for the event listener is supposed to be read-only (default false).