Chapter 01 · MongoDB Atlas Stream Processing
Subchapter 1.4
references/output-diagnostics.mdMarkdown7 KBView on GitHub
A user says “my processor isn’t outputting anything” or “output seems low.” Before assuming something is broken, you must classify the processor type — low output may be perfectly normal.
Expected output: Low or zero most of the time. Spikes during anomalous events.
Examples:
Green flags (healthy):
Red flags (problem):
Expected output: Roughly 1:1 with input volume. Output should be proportional to source.
Examples:
Green flags (healthy):
Red flags (problem):
Expected output: Variable — depends on match rate of filter criteria.
Examples:
$match for valid records)Green flags (healthy):
Red flags (problem):
Ask the user what the processor does, or inspect the pipeline:
atlas-streams-discover → inspect-processor — read the pipeline stagesClassification heuristics from pipeline:
$match with narrow conditions (e.g., severity > 8) → likely Alert$addFields/$project/$merge → likely Transformation$match filters broadly (e.g., status: "active") → likely Filter$tumblingWindow with $match inside → likely Alert (windowed anomaly detection)$tumblingWindow with $group only → likely Transformation (aggregation)atlas-streams-discover → diagnose-processorcount tool on the DLQ collectionfind tool to inspect error messagescount tool on the output collectionfind tool with sort: {"_id": -1} and limit: 5 to see most recent documents| Processor type | Zero output | Low output | Action |
|---|---|---|---|
| Alert | Probably normal | Probably normal | Verify a known test event triggers output |
| Transformation | Problem — check connections, DLQ | Problem — check filters, DLQ | Debug pipeline and connections |
| Filter | Could be normal if no data matches | Could be normal | Verify filter criteria against actual source data |
After running diagnose-processor, match the symptoms to these patterns:
| Symptom | Root Cause | Fix |
|---|---|---|
| Error 419 + “no partitions found” | Kafka topic doesn’t exist or is misspelled | Verify topic name with Kafka broker; check connection config |
| State: FAILED + multiple restarts | Connection-level error (bypasses DLQ) | Check operational logs for repeated error; fix connection config or pipeline |
| State: STARTED + zero output + windowed pipeline | Idle Kafka partitions blocking window closure | Add partitionIdleTimeout to Kafka $source (e.g., {"size": 30, "unit": "second"}) |
| State: STARTED + zero output + non-windowed | Source has no data or filter too strict | Check if source (Kafka topic, collection) has data; review $match filters |
| High memoryUsageBytes approaching tier limit | OOM risk — window state or pipeline too large | Upgrade to higher tier (see sizing-and-parallelism.md) |
| DLQ count increasing | Per-document processing errors | Use MongoDB find on DLQ collection to inspect failed documents and error messages |
When providing fix steps:
Before concluding there’s a problem, consider:
partitionIdleTimeoutWhen creating processors, encourage users to use descriptive names that indicate the processor type:
| Name pattern | Type indication |
|---|---|
fraud-detector | Alert — low output expected |
order-enricher | Transformation — 1:1 output expected |
quality-filter | Filter — variable output expected |
iot-5min-rollup | Transformation — output every 5 min |
error-monitor | Alert — low output expected |