A Deep Dive into Spring Application Events
HTML-код
- Опубликовано: 26 сен 2024
- Events have become a key element of modern application design, especially when it comes to distributed applications. But in monolithic applications, they can also be used to improve modularity, as Spring’s Application Event abstraction and the associated infrastructure components make it easy to design, publish and consume events.
The talk starts by giving an overview about the building blocks of Spring’s core event infrastructure. It continues with an example of how to decouple Spring components using events, discusses different ways of implementing a variety of interaction scenarios, and how Spring Data allows you to take a more domain-driven approach to event publication. We end up by discussing advanced event handling scenarios and failure handling.
Oliver Drotbohm: Senior Principal Software Engineer, VMware
Slides: www.slideshare...
Good Stuff. Thanks!
great stuff
Very interesting! Thank you so much.
where is the code
Here: github.com/odrotbohm/spring-events-deep-dive
If method which is marked as EventListener returns some object it will publish as a new event? Really? I tried but there wasn’t any new event. As far as I know Spring just ignores such objects
I think he means that if you want to return an object from an event then you'd need to publish another event
SpringEvents are not helpful at all when deploying on instances that can just restart due to updates to server box, it is better to use Queues or something persistent to handle events.