Skip to content

Mqtt2Clickhouse Service#154

Merged
chfritz merged 3 commits into
mainfrom
mqtt2clickhouse_service
Jan 26, 2026
Merged

Mqtt2Clickhouse Service#154
chfritz merged 3 commits into
mainfrom
mqtt2clickhouse_service

Conversation

@chfritz
Copy link
Copy Markdown
Contributor

@chfritz chfritz commented Jan 26, 2026

Cloud capabilities can now request the storage of MQTT topics for a specific number of days. Storage happens in ClickHouse from where it can be queried using queryMQTTHistory (in @transitive-sdk/clickhouse) or directly, e.g., from Grafana, using queries like:

select *, JSON_VALUE(Payload, '$') AS Date from default.mqtt_history
  WHERE 
     TopicParts[4] = '_robot-agent' AND
     TopicParts[7] = 'heartbeat'
  ORDER BY Date DESC

- Portal now registers heartbeats for 30 day storage
  - can be queried in Grafana or elsewhere using, e.g.,
  `select *, JSON_VALUE(Payload, '$') AS Date from default.mqtt_history ORDER BY Date DESC`
  - or using `clickhouse.queryMQTTHistory` in our code
- The clickhouse SDK init function now waits for server (removed that code elsewhere, incl. in portal)
@chfritz chfritz merged commit a6f64be into main Jan 26, 2026
@chfritz chfritz deleted the mqtt2clickhouse_service branch January 26, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant