Spring modulith event behavior wrt multiple instance of application #727
Replies: 1 comment
-
As the event distribution is per-application instance, an event in instance A would be processed by listeners within that instance. However, the event publication registry stores the information which listeners need to be invoked in a database. In case of an instance failure, the outstanding event publications can be resubmitted through the A lot of this (except the distributed lock approach) is covered in the reference documentation. |
Beta Was this translation helpful? Give feedback.
-
In a Spring Modulith application with multiple instances, how are event publication, processing, and resubmission managed? Specifically, does only one instance listen to the published events, with the first instance to listen handling them? If an instance shuts down abruptly during event processing, will another active instance take over and handle the event reprocessing?
FYI: My application is deployed in AWS via Kubernetes and has 3 application replicas with 1 database instance.
Beta Was this translation helpful? Give feedback.
All reactions