Store pending messages on broker's side
- Dominant language
- C#
- Stars
- 5.1k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the feature request
I need to store messages pending in server's queues, that are not yet delivered to subscribers. And when server crashes, I would like to restore these queues to be sure that every message reaches each subscriber.
### Which project is your feature request related to?
- Server
### Describe the solution you'd like
I need to store messages pending in server's queues, that are not yet delivered to subscribers. And when server crashes, I would like to restore these queues to be sure that every message reaches each subscriber.
For example, when client (subscriber) is disconnected for some time, its queue on server side is populated with new pending messages. And when server crashes at this point, subscriber will lose those messages. Even when the server restarts and subscriber's reconnect will take place, messages are lost.
### Additional context
Place of storing should be decided on my own. It may be file, database or whatever.
@saba-sabrin I think we just store the messages in memory, so if the broker is restarted you will still loose messages.
@chkr1011 should we extend IMqttServerStorage or provide a similar interface like IMqttSessionStorage to store pending messages of a session?
_Originally posted by @JanEggers in https://github.com/chkr1011/MQTTnet/issues/498#issuecomment-448552957_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.