Skip to content

Commit

Permalink
Update PersistenceIds query documentation to reflect the current fix (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkatufus authored Aug 21, 2020
1 parent ebe5fd9 commit 920497e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/articles/persistence/persistence-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The predefined queries are:

**AllPersistenceIdsQuery (PersistentIds) and CurrentPersistenceIdsQuery**

`AllPersistenceIds`, or `PersistenceIds` in `IPersistenceIdsQuery`, is used to retrieve all cached persistenceIds of all persistent actors inside the `ActorSystem` where the journal actor is instantiated. Note that since this is a cached value, this query will only report `PersistentIds` that passed to the journal since the journal creation time (local cache).
`AllPersistenceIds` or `PersistenceIds`, and `CurrentPersistenceIds` in `IPersistenceIdsQuery` is used for retrieving all persistenceIds of all persistent actors.

```csharp
var queries = PersistenceQuery.Get(actorSystem)
Expand All @@ -64,7 +64,7 @@ The returned event stream is unordered and you can expect different order for mu

The stream is not completed when it reaches the end of the currently used `PersistenceIds`, but it continues to push new `PersistenceIds` when new persistent actors are created. Corresponding query that is completed when it reaches the end of the currently used `PersistenceIds` is provided by `CurrentPersistenceIds`.

The write journal is notifying the query side as soon as new `PersistenceIds` are created and there is no periodic polling or batching involved in this query.
Periodic polling of new `PersistenceIds` are done on the query side by retrieving the events in batches that sometimes can be delayed up to the configured `refresh-interval` or given `RefreshInterval` hint.

The stream is completed with failure if there is a failure in executing the query in the backend journal.

Expand Down

0 comments on commit 920497e

Please sign in to comment.