How to implement notification system in nodejs?
===

I am doing notifications about new messages. I think I need open socket for each user and server will send notification when a new message. I want to use socket.io and redis pub/sub. When user send messages, it's publishing this event to redis and nodejs server that will be subscriber and will notify client about new message. But in this case, the message immediately will be removed from the queue and when the user updates the page he receives notify that all messages are read because the queue is empty, but actually messages aren't read. How to decide this problem?