Redis: how (or should) I delete pubsub channels

In my application, I dynamically create new pubsub channels, and maybe too many, for example, 5k per day. According to my application requirements, any channel is used for no more than 5 minutes.

Given this situation, thousands of thousands of unused channels will be present in the application in a week. So how can I delete unused channels or even delete them. Are they stored in memory? What happens to messages published through them, they remain in redis memory?

thanks

+6
source share
1 answer

Channels surround. They exist only by subscription. So: either call [P] UNSUBSCRIBE from the connected signatures, or close the signed connections.

+10
source

Source: https://habr.com/ru/post/945146/