@nats-io/jetstream
    Preparing search index...

    Type Alias StreamExpectations

    StreamExpectations are used implement some assertions before adding a message to the stream.

    type StreamExpectations = {
        lastMsgID: string;
        lastSequence: number;
        lastSubjectSequence: number;
        lastSubjectSequenceSubject: string;
        lastSubjectSequenceValue: number;
        streamName: string;
    }
    Index

    Properties

    lastMsgID: string

    The expected last msgID of the last message received by the stream.

    lastSequence: number

    The expected last sequence on the stream.

    lastSubjectSequence: number

    The expected last sequence on the stream for a message with this subject

    lastSubjectSequenceSubject: string

    This option is used in conjunction with lastSubjectSequence. It enables a constraint on the sequence to be based on the specified subject (which can have wildcards) rather than the subject of the message being published.

    Here's an example set of sequences for specific subjects:

    ┌─────────┬────────┐ │ subj │ Seq │ ├─────────┼────────┤ │ a.1.foo │ 1 │ │ a.1.bar │ 6 │ │ a.2.foo │ 3 │ │ a.3.bar │ 4 │ │ a.1.baz │ 5 │ │ a.2.baz │ 7 │ └─────────┴────────┘

    The LastSubjectSequenceSubject for wildcards in the last token Are evaluated for to the largest sequence matching the subject: ┌────────────────────┬────────┐ | Last Subj Seq Subj | Seq | ├────────────────────┼────────┤ │ a.1.* │ 6 │ │ a.2.* │ 7 │ │ a.3.* │ 4 │ └────────────────────┴────────┘

    lastSubjectSequenceValue: number

    The expected last sequence on the stream for a message with this subject and this value.

    streamName: string

    The expected stream capturing the message