resgateio / resgate

A Realtime API Gateway used with NATS to build REST, real time, and RPC APIs, where all your clients are synchronized seamlessly.
https://resgate.io
MIT License
685 stars 67 forks source link

Unsubscribe on delete #219

Closed jirenius closed 2 years ago

jirenius commented 2 years ago

Issue

When Resgate receives a delete event on any of its subscribed resources, it should unsubscribe any clients' direct subscriptions to that resource, including sending an unsubscribe event, after sending the delete event.

This is to avoid client to end up with conflicts between stale data of the deleted resource, and new data created with using same resource ID.

Notes

jirenius commented 2 years ago

Resolved in PR #223