Change stream events

The event types a change stream delivers and when each one appears.

Each event carries its operationType, its resume token and the commit timestamp. Events come out in commit order, with transactions together.

operationTypeWhen it appears
insertA document was inserted.
updateA document was updated.
replaceA document was replaced.
deleteA document was deleted.
dropThe collection was dropped.
renameThe collection was renamed.
dropDatabaseThe database was dropped.
invalidateThe stream cannot go on and closes.
createA collection was created; it needs showExpandedEvents.
createIndexesIndexes were created; it needs showExpandedEvents.
dropIndexesIndexes were dropped; it needs showExpandedEvents.
modifyThe collection options changed; it needs showExpandedEvents.
shardCollectionThe shard key was set; it needs showExpandedEvents.
refineCollectionShardKeyThe shard key was refined; it needs showExpandedEvents.
reshardCollectionThe shard key was changed; it needs showExpandedEvents.

See also