A Deep Dive into Spring Application Events
summary
Shows that Spring events are synchronous method calls unless annotated with @Async, and that Spring Data’s AbstractAggregateRoot moves event registration into the aggregate so saves auto-publishes domain events. Explains TransactionalEventListener runs on commit (useful for emails) and exposes the bug that failures can lose notifications, then demos an event publication registry prototype persisting event metadata with JPA and Jackson so failed post-commit handlers can be retried or recovered; integration tips and a modulus JUnit extension for testing complete the work.
AI-written summary · about
chapters (9)
- 0:00Introduction to Spring Events
- 1:07Fundamentals of Application Events
- 8:36Spring Data Event Integration
- 12:47Events and Transactions
- 16:41Error Scenarios Explained
- 23:31Improving Transactional Listeners
- 32:41Architectural Impact of Events
- 41:00Decoupling Components with Events
- 51:09Q&A and Resources
related talks
01h 20mSpringOne2GX 2012 Keynote Day 1: Spring 2012 and Beyond
50mSpring's unexpected features
55mHands-on introduction o CQRS and Event Sourcing with Axon
53mSpring Puzzlers
56mEvents on the outside, on the inside and at the core
01h 12mDemystifying "event-based" software concepts and methodologies
41mIntegration Testing with Spring
46mAsyncAPI + Spring Cloud Stream = Event-Driven Microservices Made Easy
