In the previous handling of events, event were handled immediately during the transaction, in the same thread. This caused a lot of delays, blocking the database threads. The EventListener annotations are replaced by TransactionalEventListener annotations to ensure that the previous transaction has been committed before processing the event. It explicitly creates a new transaction to avoid overlapping transactions. Finally, the Async annotation enables async processing to avoid the existing transaction threads being blocked.
This fixes an issue that caused timeouts if the fcm handling had timeouts.
In the previous handling of events, event were handled immediately during the transaction, in the same thread. This caused a lot of delays, blocking the database threads. The
EventListener
annotations are replaced byTransactionalEventListener
annotations to ensure that the previous transaction has been committed before processing the event. It explicitly creates a new transaction to avoid overlapping transactions. Finally, theAsync
annotation enables async processing to avoid the existing transaction threads being blocked.This fixes an issue that caused timeouts if the fcm handling had timeouts.