does redis pub sub persist historical messages in a channel?

The pub/sub messages are not queued, and even less persisted.

They are only buffered in the socket buffers, and immediately sent to the subscribers in the same event loop iteration as the publication.

If a subscriber fails to read a message, this message is lost for the subscriber.


You can play with Redis Streams that were released sine 5.0 version. They support persistency and can fit your needs. More details you can find from the article that compares these similar but different data types.