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.
| operationType | When it appears |
|---|---|
insert | A document was inserted. |
update | A document was updated. |
replace | A document was replaced. |
delete | A document was deleted. |
drop | The collection was dropped. |
rename | The collection was renamed. |
dropDatabase | The database was dropped. |
invalidate | The stream cannot go on and closes. |
create | A collection was created; it needs showExpandedEvents. |
createIndexes | Indexes were created; it needs showExpandedEvents. |
dropIndexes | Indexes were dropped; it needs showExpandedEvents. |
modify | The collection options changed; it needs showExpandedEvents. |
shardCollection | The shard key was set; it needs showExpandedEvents. |
refineCollectionShardKey | The shard key was refined; it needs showExpandedEvents. |
reshardCollection | The shard key was changed; it needs showExpandedEvents. |