package redis
Type Members
-
class
RedisJournal extends AsyncWriteJournal
Stores events inside a redis database.
Stores events inside a redis database.
For each persistence id
persistenceId
, it creates two keys:journal:persisted:persistenceId
contains a sorted set of events (sorted by sequence number)journal:persisted:persistenceId:highestSequenceNr
contains the highest sequence number
For each tag
t
, it creates a keyjournal:tag:t
which contains the ordered list of pair (sequenceNr, persistenceId). Order in this list is the order in which events with the given tagt
were recorded.It also maintains following keys:
journal:persistenceIds
which is a set of persistence identifiers.journal:tags
which is the set of all tags.
Using the redis PubSub mechanism, this journal notifies whoever is interested on following channels:
journal:channel:ids
any new persisted identifier is publishedjournal:channel:persisted:<id>
anytime a new event is appended to a persistence id<id>
, the sequenceNr is publishedjournal:channel:tags
anytime a new event is appended to a tag, the tag name is published