0

I am using Redis with Node Js to share events between processes.

When I do a pub.publish('...', 'message'); the other node processes are notified by a sub.on('message', ... event which is fine and it works ok.

Could someone please advise whether this Redis event/information is being stored/cached temporarily/permanently in memory. Do I have to delete this out of memory manualy ? Or does it automatically expires ? If so, when ?

I plan to publish a lot of small messages and instantly grab them but I am a little bit confused since I don't know exactly what is happening in the Redis backstage.

Jack M.
  • 3,676
  • 5
  • 25
  • 36
  • 1
    You can refer to this answer that quickly describes what happens behind the scenes: http://stackoverflow.com/questions/24210754/redis-pub-sub-channel-memory/24219813#24219813 – deltheil Aug 09 '14 at 07:44

1 Answers1

1

Pub/Sub messages are never being stored in memory, they are not treated as 'Data', but just being delivered to the channel subscribers instantly.

Never mind deleting nor expiring them.

ALittleDiff
  • 1,191
  • 1
  • 7
  • 24