The publish/subscribe messaging pattern
Redis also includes an implementation of the publish/subscribe messaging pattern. This section demonstrates how we can use Spring Data Redis for the purpose of sending and receiving messages. As an example, we will modify the CRUD application that stores the contact information as JSON to send notifications when a new contact is added, contact information is updated, and a contact is deleted.
We can implement this requirement by performing the following steps:
- Create message listeners that process the received messages.
- Configure the application context of our application.
- Send messages by using the
This section also describes how we can ensure that our implementation is working correctly. ...