Skip to content

1. Variable Overview

VariableTypeDescription
app_idstringApp ID (Number converted to string)
app_namestringApp Name
plugin_typestringPlugin Type (e.g., kafka / pulsar)
event_kindstringEvent Type (e.g., telemetry/attributes/device_connected/device_disconnected)
ts_msstringMillisecond Timestamp (String)
device_idstringDevice ID (String)
device_namestringDevice Name

1.2 Conditional Variables (May be empty for some event types)

VariableTypeDescriptionReason for Potential Emptiness
device_typestringDevice TypeTelemetry/Attributes currently may not have device_type
channel_namestringChannel NameTelemetry/Attributes inferred via point meta, may not be available if meta missing or values empty

TIP

For variables that may be empty, recommend using default helper as fallback, avoiding empty segments in topic/key.

1.3 Time Partition Variables (UTC)

These variables are used to build time-partitioned topics (e.g., writing to data lake):

VariableExampleDescription
yyyy2026Year (4 digits)
MM01Month (2 digits)
dd19Day (2 digits)
HH08Hour (2 digits, UTC)

Example:

text
lake.{{yyyy}}.{{MM}}.{{dd}}.{{HH}}.ng.uplink.{{event_kind}}

2. Behavior of "Missing Variables"

The template engine is non-strict:

  • Variable missing → Renders as empty string
  • No error (And does not block sending)

Therefore:

  • Want stable topic: Use default helper
  • Want to quickly find issues: Observe "Whether topic is rendered as empty/abnormal" during troubleshooting

Released under the Apache License 2.0.