Reputation: 666
Is it possible to use Redis streams with persistent storage or are streams limited to in memory data only ?
I know that it is possible to use Redis with persistent storage of core data structures but I have been able understand if one can also avail of persistent storage for streams in Redis.
Upvotes: 3
Views: 4466
Reputation: 6764
Redis Streams are persisted as any other data type. Streams are a data structure on its own right, a core one in the sense that it is part of Redis core since 5.0.
There is no way to actually persist only some data types. It persists them all if AOF or RDB are set up.
Pub/sub is not persisted at all, but that's because messages in pub/sub exist only while the message is being processed, i.e. being sent to all clients subscribed at that moment.
Here more on What are the main differences between Redis Pub/Sub and Redis Stream?
Upvotes: 4