Unsubscribe stops the subscription and cleans up resources. Use this when you no longer need to receive events from a specific event path, such as when shutting down a service, removing a feature, or cleaning up temporary subscriptions.Documentation Index
Fetch the complete documentation index at: https://docs.ensync.cloud/llms.txt
Use this file to discover all available pages before exploring further.
Usage
- Node.js
- Python
When to Use
- Service shutdown: Clean up before stopping your application
- Feature removal: Stop receiving events for deprecated features
- Temporary subscriptions: End subscriptions created for one-time operations
- Resource cleanup: Free up connections and memory
Pause vs Unsubscribe
| Action | Events Queued | Reconnect | Use Case |
|---|---|---|---|
| Pause | Yes | continue() | Temporary stop, maintenance |
| Unsubscribe | No | New subscription | Permanent stop, cleanup |
After unsubscribing, you’ll need to create a new subscription to receive events again.