An EventEnvelope wraps a journal event with the context needed to consume it through persistence queries. A typical envelope contains an offset, persistence identifier, sequence number, event payload, and timestamp. Queries return envelopes rather than bare events so streams and projections can track where each event came from. section 10.2 section 10.3.2
Reading and processing an envelope
A tagged query such as readJournal.eventsByTag("container-tag-0", Offset.noOffset) produces a Source[EventEnvelope, NotUsed]. One result can contain persistence ID "spcontainer-type-key|9", sequence number 1, and a CargoAdded event. A projection handler receives that envelope, pattern-matches envelope.event, and updates a repository when the event is relevant. section 10.2 section 10.3.2
Table 10.1 Methods available to consume the journal: inputs and outputs (view table figure)
Compare persistence-query methods that return EventEnvelope streams, including tag queries and persistence-ID queries, with current and historical variants. section 10.2
