Change streams cho phép app subscribe changes từ collection/database/cluster để build realtime features, cache invalidation, audit pipeline, sync sang search index hoặc event-driven projection.
Ví dụ Node.js:
javascript
const stream = db.collection("orders").watch()
for await (const change of stream) {
console.log(change.operationType, change.documentKey)
}Production cần resume token, error handling, idempotent consumers và monitoring lag.
Không nên coi change stream là magic queue nếu chưa thiết kế retry/dedup.