You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the tedge-agent as a child device, it subscribes to the legacy tedge/ topics when it shouldn't. For instance, below is the log output showing the unwanted subscriptions:
2024-07-31T16:48:56.526015106Z INFO sm-agent: tedge_agent::agent: Running as a child device, tedge_to_te_converter and File Transfer Service disabled
2024-07-31T16:48:56.526161588Z INFO Runtime: Running Signal-Handler-0
2024-07-31T16:48:56.52627807Z INFO sm-agent: MQTT sub: te/device/pump///cmd/+/+
2024-07-31T16:48:56.526385737Z INFO sm-agent: MQTT sub: te/device/pump/service/tedge-agent/cmd/health/check
2024-07-31T16:48:56.526485459Z INFO sm-agent: MQTT sub: tedge/measurements
2024-07-31T16:48:56.526583163Z INFO sm-agent: MQTT sub: tedge/measurements/+
2024-07-31T16:48:56.526677182Z INFO sm-agent: MQTT sub: tedge/events/+
2024-07-31T16:48:56.526770423Z INFO sm-agent: MQTT sub: tedge/events/+/+
2024-07-31T16:48:56.526864553Z INFO sm-agent: MQTT sub: tedge/alarms/+/+
2024-07-31T16:48:56.527146443Z INFO sm-agent: MQTT sub: tedge/alarms/+/+/+
2024-07-31T16:48:56.52724835Z WARN sm-agent: MQTT sub: ignoring overlapping subscription to te/device/pump///cmd/health/check
Background
The tedge-agent includes a legacy topic converter, however it is only activated when the tedge-agent is running as the main device (e.g. te/device/main//). When running as a child device, the converter is not running (which is correct), however the topic converter builder already alters the MQTT actor and adds the subscriptions to the legacy topics.
To Reproduce
Run the tedge-agent as a child device for a few seconds and inspect the log output to see the subscriptions:
Describe the bug
When running the tedge-agent as a child device, it subscribes to the legacy
tedge/
topics when it shouldn't. For instance, below is the log output showing the unwanted subscriptions:Background
The tedge-agent includes a legacy topic converter, however it is only activated when the tedge-agent is running as the main device (e.g.
te/device/main//
). When running as a child device, the converter is not running (which is correct), however the topic converter builder already alters the MQTT actor and adds the subscriptions to the legacy topics.To Reproduce
Run the tedge-agent as a child device for a few seconds and inspect the log output to see the subscriptions:
TEDGE_RUN_LOCK_FILES=false timeout 5 tedge-agent --mqtt-device-topic-id "device/pump//"
Below are the examples of the legacy topics that should not be subscribed to when running as a child device.
Expected behavior
When the tedge-agent is running as a child device, it should not subscribe to
tedge/#
topics.Screenshots
Environment (please complete the following information):
Debian GNU/Linux 12 (bookworm)
Raspberry Pi 5 Model B Rev 1.0
Linux rpi5-d83add9f145a 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
tedge 1.1.2~326+g2a9eed4
2.0.18
Additional context
The text was updated successfully, but these errors were encountered: