Skip to content

1. Which one should you choose

ModeApplicable ScenarioProsCons/Notes
EnvelopeJson (Default Recommended)Long-term integration, version evolution, mixed events (Telemetry/Attributes/Online/Offline etc.)Stable Semantics, Extensible, Easy to troubleshootRelatively larger volume (Field name repetition)
KvOnly care about Telemetry/Attributes, want more "Compact Readable"Simple structure {ts_ms, values}Currently only applicable to Telemetry/Attributes; Recommend not using for device online/offline events
TimeseriesRowsData Lake/TSDB ingestion (Row-based)Easy for batch write, easy to tableOutput is array, platform side needs to handle by row
MappedJsonPlatform field/structure mismatch, need declarative transformationTransform without writing codeNeed to understand JMESPath; Readability drops when rules are complex

Rule of Thumb

  • Initial Integration: Use EnvelopeJson (Easiest to troubleshoot)
  • Pursue Throughput/Lake Ingestion: Use TimeseriesRows or Kv
  • Need to integrate platform custom structure: Use MappedJson

3. Relationship with Template/Partition

payload is responsible for "What the message body looks like", topic/key is responsible for "Where the message goes, how to partition":

Released under the Apache License 2.0.