mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
11 lines
1.1 KiB
Markdown
11 lines
1.1 KiB
Markdown
# Durable
|
|
|
|
If an application wishes to resume message consumption from where it previously stopped, it needs to create a durable subscription. It does so by providing a durable name, which is combined with the client ID provided when the client created its connection. The server then maintains the state for this subscription even after the client connection is closed.
|
|
|
|
_**Note: The starting position given by the client when restarting a durable subscription is ignored.**_
|
|
|
|
When the application wants to stop receiving messages on a durable subscription, it should close - but _not unsubscribe_ - this subscription. If a given client library does not have the option to close a subscription, the application should close the connection instead.
|
|
|
|
When the application wants to delete the subscription, it must unsubscribe it. Once unsubscribed, the state is removed and it is then possible to re-use the durable name, but it will be considered a brand new durable subscription, with the start position being the one given by the client when creating the durable subscription.
|
|
|