© Felipe Gutierrez 2017

Felipe Gutierrez, Spring Boot Messaging, 10.1007/978-1-4842-1224-0_3

3. Application Events

Felipe Gutierrez

(1)Albuquerque, New Mexico, USA

This chapter covers how to use the observer pattern (behavioral pattern) as a way to send messages to whoever needs them or whoever is listening. The chapter also shows how the Spring Framework implements this pattern through its application events, which can be declared as a simple interface implementation or by using specialized annotations.

The Observer Pattern

This particular pattern defines one-to-many dependencies between objects, so when one object (the subject) change its state, it needs to inform the others (observers) about this change. Then they can react to the change, as shown ...

Get Spring Boot Messaging: Messaging APIs for Enterprise and Integration Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.