Hermes MongoDB
    Preparing search index...

    Type Alias OutboxConsumerModel

    MongoDB document model for outbox consumer state.

    This tracks the consumer's progress through the Change Stream, enabling resume capability after crashes or restarts.

    // Document in MongoDB consumer state collection:
    {
    _id: ObjectId("507f1f77bcf86cd799439012"),
    lastProcessedId: ObjectId("507f1f77bcf86cd799439011"),
    resumeToken: { _data: "826..." },
    partitionKey: "default",
    lastUpdatedAt: ISODate("2024-01-15T10:30:02Z"),
    createdAt: ISODate("2024-01-15T10:00:00Z")
    }
    type OutboxConsumerModel = {
        _id: ObjectId;
        createdAt: Date;
        lastProcessedId: ObjectId | null;
        lastUpdatedAt: Date | null;
        partitionKey: string;
        resumeToken: ResumeToken;
    }
    Index

    Properties

    _id: ObjectId

    MongoDB ObjectId uniquely identifying this consumer

    createdAt: Date

    Timestamp when this consumer was created

    lastProcessedId: ObjectId | null

    ObjectId of the last successfully processed message (null if none processed yet)

    lastUpdatedAt: Date | null

    Timestamp of last state update (null if never updated)

    partitionKey: string

    Partition key this consumer is responsible for

    resumeToken: ResumeToken

    MongoDB Change Stream resume token for crash recovery