For this recipe, we are going to review all predefined queries:
- AllPersistenceIdsQuery: This returns a live stream that emits all persistence IDs. This query can be used by calling readJournal.persistenceIds().
- CurrentPersistenceIdsQuery: This returns a stream, the same as AllPersistenceIds, but does not keep a live subscriber for new incoming events. Therefore, this variant only emits the persistence IDs in the journal. This query can be used by calling readJournal.currentPersistenceIds().
- EventsByPersistenceIdQuery: This returns a live stream that emits all events from a given persistence ID. This query can be used by calling
readJournal.eventsByPersistenceId("some-persistence-id").
- CurrentEventsByPersistenceIdQuery: This ...