开发者

redis pub sub and ttl

Is there a way so that I expire a "published" message in redis?

I need this because, as per my understanding, any published message will be put in a queue till there is a subscriber. In such a case if there is no subscriber, I am storing the data ev开发者_如何转开发en after it may have become useless.


Published message never store in redis. Redis PUB/SUB


One more thing to think about is: you can always add a timestamp inside your messages' string representation. Then, even if a consumer gets a message but doesn't process it on time, it can ignore it.

Also, as Ganesh mentioned the pubsub queue doesn't store messages.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜