---
title: "Data subscriptions: FAQ"
description: "Answers to common questions about RavenDB data subscriptions: delivery guarantees, document order, failure handling, concurrent workers, permissions, and limits."
url: "https://docs.ravendb.net/7.2/data-subscriptions/faq"
version: "7.2"
---

# Data subscriptions: FAQ

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## Data subscriptions: FAQ

> **Note**
>
> - In this article:
>   - [Can the same document be processed more than once?](#can-the-same-document-be-processed-more-than-once)
>   - [In what order are documents sent?](#in-what-order-are-documents-sent)
>   - [What happens if a worker disconnects or crashes?](#what-happens-if-a-worker-disconnects-or-crashes)
>   - [Why are all documents processed again each time my application restarts?](#why-are-all-documents-processed-again-each-time-my-application-restarts)
>   - [Can several workers consume the same subscription at once?](#can-several-workers-consume-the-same-subscription-at-once)
>   - [What access level is needed to create or consume a subscription?](#what-access-level-is-needed-to-create-or-consume-a-subscription)
>   - [What happens if the responsible node goes down?](#what-happens-if-the-responsible-node-goes-down)
>   - [Can a subscription's query be changed after creation?](#can-a-subscriptions-query-be-changed-after-creation)
>   - [Does a subscription stop when no documents are left?](#does-a-subscription-stop-when-no-documents-are-left)
>   - [Can a subscription deliver document revisions?](#can-a-subscription-deliver-document-revisions)
>   - [How is a subscription different from ETL or external replication?](#how-is-a-subscription-different-from-etl-or-external-replication)
>   - [Is there a limit on the number of concurrent connections?](#is-there-a-limit-on-the-number-of-concurrent-connections)

## Frequently Asked Questions {#frequently-asked-questions}

### Can the same document be processed more than once?

Yes. Data subscriptions provide at-least-once delivery, so a document can reach a worker more than
once in these situations:

- A worker fails before acknowledging a batch it has processed. The server re-sends the batch the
  next time a worker connects.

- In a concurrent subscription, a worker drops, and the server reassigns the documents it was
  processing to the other workers.

- The subscription moves to another node (e.g., after a node failure), and the new node cannot always
  locate the exact point the previous node reached, so some documents may be sent again.

Make your processing idempotent so that reprocessing a document has no unintended effect.

See: [At-least-once delivery](https://docs.ravendb.net/7.2/data-subscriptions/consuming-subscription.md#at-least-once-delivery)

### In what order are documents sent?

The server sends documents to the worker in Etag order, which reflects the order in which the
documents were last modified.

A document the worker has already acknowledged is not sent again, except in these cases:

- It was modified after the server sent it.

- It belongs to a batch the worker received but did not acknowledge.

- The subscription was reassigned to another node.

See: [Processing order and re-sending](https://docs.ravendb.net/7.2/data-subscriptions/overview.md#processing-order-and-re-sending)

### What happens if a worker disconnects or crashes?

The server keeps track of the batches the worker has acknowledged, so a worker that reconnects
continues after the last acknowledged batch instead of starting over.

A batch the worker received but did not acknowledge is sent again, so some documents may be
processed more than once.

See: [Progress persistence and failover](https://docs.ravendb.net/7.2/data-subscriptions/overview.md#progress-persistence-and-failover)

### Why are all documents processed again each time my application restarts?

When your application calls `store.Subscriptions.Create` without passing the method a name, the server creates
a new subscription, sets the subscription's name to the subscription's ID, and returns this name.  
If your application creates a new subscription this way each time it starts, and then passes the subscription's
name to the worker, processing will start from scratch for the worker each time the application starts.

e.g.,

```csharp
string subscriptionName = store.Subscriptions.Create<Order>();
var worker = store.Subscriptions.GetSubscriptionWorker<Order>(subscriptionName);
```

To continue processing where it left off, use one of these options:

- **Using `Create`**  
  Create the subscription only once, with a name, and pass this name to the worker each time the application starts.
- **Using `Update`**  
  Each time the application starts, call `Update` with the subscription's name and definition, and pass the name to the worker.  
  Set the `CreateNew` property of the `SubscriptionUpdateOptions` object passed to `Update` to `true`, so that if a subscription
  with this name does not exist yet, `Update` creates the subscription.  
  If the subscription already exists, `Update` keeps the subscription's processing progress.

See: [Creating a subscription](https://docs.ravendb.net/7.2/data-subscriptions/creating-subscription/creating-subscription_api.md#creating-a-subscription),
[Creating a subscription via update](https://docs.ravendb.net/7.2/data-subscriptions/creating-subscription/creating-subscription_api.md#creating-a-subscription-via-update),
and [Usage example](https://docs.ravendb.net/7.2/data-subscriptions/overview.md#usage-example)

### Can several workers consume the same subscription at once?

By default, only one worker consumes a subscription at a time. A worker's strategy decides whether
it connects only when free, takes over, or waits for the current worker to disconnect.

To let several workers consume the subscription simultaneously and divide the processing load, use
the **concurrent** strategy.

See: [Concurrent subscriptions](https://docs.ravendb.net/7.2/data-subscriptions/concurrent-subscriptions.md) and
[Worker strategies](https://docs.ravendb.net/7.2/data-subscriptions/consuming-subscription.md#worker-strategies)

### What access level is needed to create or consume a subscription?

Most ongoing tasks can be created, updated, and deleted only by a client with database admin
clearance.

A data subscription is the exception: any client with Read/Write access to the database can create,
update, and delete one.

Consuming a subscription requires **Read Only** access.

See: [Security considerations](https://docs.ravendb.net/7.2/data-subscriptions/overview.md#security-considerations)

### What happens if the responsible node goes down?

The subscription's progress is stored at the cluster level, so the subscription can continue on
another node.

If your license includes **highly available tasks**, the cluster reassigns it to another node
automatically. Otherwise, it resumes on its original node once that node is back online.

See: [highly available tasks](https://docs.ravendb.net/7.2/server/clustering/distribution/highly-available-tasks.md)

### Can a subscription's query be changed after creation?

Yes. Change the subscription's definition, including its query, using the `Update` method.

You can target the subscription by name, or by the ID the server assigned it at creation.

See: [Updating a subscription](https://docs.ravendb.net/7.2/data-subscriptions/creating-subscription/creating-subscription_api.md#updating-a-subscription)

### Does a subscription stop when no documents are left?

Not by default.

When no matching documents remain, the worker waits, and the server sends new matching documents as
they arrive.

To process every current match once and then stop, set `CloseWhenNoDocsLeft` so the worker throws a
`SubscriptionClosedException` when it finishes.

See: [End when no documents are left](https://docs.ravendb.net/7.2/data-subscriptions/consuming-subscription.md#example-end-when-no-documents-are-left)

### Can a subscription deliver document revisions?

Yes. When the Revisions feature is enabled for the collection, a subscription can process
consecutive pairs of document revisions instead of current documents.

The worker can then act on what changed between revisions.

See: [Revisions support](https://docs.ravendb.net/7.2/data-subscriptions/revisions-support.md)

### How is a subscription different from ETL or external replication?

All three send data out of the database, but to different destinations:

- **ETL** pushes transformed data to an external system, such as a relational database, a message
  queue, or another RavenDB instance.

- **External replication** keeps another RavenDB database in sync.

- **A data subscription** streams matching documents to a worker in your own application, in batches
  it acknowledges, while the server tracks progress so processing can pause and resume.

See: [What is a data subscription](https://docs.ravendb.net/7.2/data-subscriptions/overview.md#what-is-a-data-subscription)

### Is there a limit on the number of concurrent connections?

Yes. The number of concurrent connections allowed per database is capped by a configuration key that
defaults to 1000.

The key can be set server-wide or per database.

See: [Subscriptions.MaxNumberOfConcurrentConnections](https://docs.ravendb.net/7.2/data-subscriptions/configuration.md#subscriptionsmaxnumberofconcurrentconnections)
