Session Windows
Parent: MongoDB Atlas Stream Processing · Published reference · snapshot 2026-10-23 · skill mongodb-cohort-40309c756b09
↓ Facts as markdownall context files
Source-anchored research for Session Windows. Run status: COMPLETED.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
How it works
- In Atlas, $sessionWindow runs a nested aggregation pipeline over each session and releases its results to the next stage when that window closes. (high confidence) [source]
- Atlas event-time sessions close when the watermark advances beyond the session’s maximum event timestamp plus gap and allowedLateness. Their start is the earliest event timestamp; their end is the latest event timestamp plus gap. (low confidence) [source]
- Atlas sends documents to the DLQ when partitionBy evaluation fails, or when an event is older than the latest source watermark and has no open session. (low confidence) [source]
- A practical Atlas pattern groups shopping activity by user, aggregates each session, and triggers downstream abandoned-cart actions after inactivity. (high confidence) [source]
Facts and statements
- Session windows group activity into variable-length sessions separated by an inactivity gap; partitioning by user or device keeps each entity’s sessions independent. (high confidence) [source]
- An out-of-order Atlas event can bridge and merge two open sessions belonging to the same partition. (low confidence) [source]
- Atlas requires gap and pipeline. partitionBy is optional: omission puts every document into one null partition. Only a single field or simple expression is supported, not multi-key embedded documents. (low confidence) (verified as of 2026-10-14) [source]
- Atlas defaults boundary to eventTime and allowedLateness to three seconds; specifying allowedLateness with boundary: processingTime is prohibited. (low confidence) (verified as of 2026-10-14) [source]
- Do not assume session APIs are interchangeable: Azure exposes timeout and maximum duration, while Atlas’s documented $sessionWindow parameters expose gap and allowedLateness without a maximum-duration parameter. (medium confidence) [source]
- Implementation semantics differ: Azure documents a maximum-duration parameter, while Spark accepts dynamic per-row gaps. Neither option appears in the cited Atlas session-stage syntax. (high confidence) (verified as of 2026-10-23) [source]
Children
- Session gap selection (frontier)
- Out-of-order session merging (frontier)
- Session partition keys (frontier)
- Watermark-driven session closure (frontier)
Frontier under this node: Out-of-order session merging, Session gap selection, Session partition keys, Watermark-driven session closure