...

/

Publish/Subscribe Pattern Using Redis

Publish/Subscribe Pattern Using Redis

Learn how to integrate our chat servers using Redis and the Publish/Subscribe pattern.

Using Redis as a simple message broker

We start our analysis of the most common Pub/Sub implementations by introducing Redis, which is a very fast and flexible in-memory data structure store. Redis is often used as a database or a cache server, however, among its many features, there’s a pair of commands specifically designed to implement a centralized Pub/Sub message exchange pattern.

Redis’ message brokering capabilities are (intentionally) very simple and basic, especially if we compare them to those of more advanced message-oriented middleware. However, this is one of the main reasons for its popularity. Often, Redis is already available in an existing infrastructure, for example, used as a cache server or as a session data store. Its speed and flexibility make it a very popular choice for ...