deepstreamIO / deepstream.io

deepstream.io server
https://deepstreamio.github.io
MIT License
7.13k stars 382 forks source link

If you send a notif to a user and he is offline, he can't receive this notif when he reconnect. #1128

Closed e-maskour closed 1 year ago

e-maskour commented 1 year ago

When sending notifications in DeepstreamIO, if a user is offline and later reconnects, he will not see the notification. In addition to that records is empty. Can you please suggest any solution?

I try to send notifications to many users, I found that if I send for example 3 notifs the user received the last one, but if he is offline and the reconnect, he can't notify.

e-maskour commented 1 year ago

Can you please guide me?

jaime-ez commented 1 year ago

Hi, you seem to be mixing some concepts.

In deepstream you can send events : connected user subscribes to the topic and therefore can receive messages emmited under that topic. If he is not subscribed, or not connected the server, he won't receive the event.

Another concept are records, which are JSON documents that can be persisted to database and to which one can read/write and subscribe in order to receive notifications when the record changes.

If you want messages to persist, you must use a record.

I suggest going through the documentation at https://deepstreamio.github.io

e-maskour commented 1 year ago

Thanks for saving my day @jaime-ez. You really do a great work.