diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2024-06-03 06:11:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-03 06:11:37 -0700 |
commit | a7665afd35006c3ed2f5b11a02214bc784732304 (patch) | |
tree | f6666fadbf272b75fabe8f65bbdadaa1c98073b7 | |
parent | 64528b96da4a742070d5845a876b07ca66ad0be3 (diff) | |
parent | b8ae04d5435fda76646da139fb0b74068c60caf7 (diff) | |
download | trackermap-server-a7665afd35006c3ed2f5b11a02214bc784732304.tar.gz trackermap-server-a7665afd35006c3ed2f5b11a02214bc784732304.tar.bz2 trackermap-server-a7665afd35006c3ed2f5b11a02214bc784732304.zip |
Merge pull request #5329 from geduxas/patch-1
Wrong data published in MQTT (PositionForwarderMqtt)
-rw-r--r-- | src/main/java/org/traccar/forward/PositionForwarderMqtt.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/forward/PositionForwarderMqtt.java b/src/main/java/org/traccar/forward/PositionForwarderMqtt.java index 53f0ced19..3a3600073 100644 --- a/src/main/java/org/traccar/forward/PositionForwarderMqtt.java +++ b/src/main/java/org/traccar/forward/PositionForwarderMqtt.java @@ -37,7 +37,7 @@ public class PositionForwarderMqtt implements PositionForwarder { @Override public void forward(PositionData positionData, ResultHandler resultHandler) { try { - String payload = objectMapper.writeValueAsString(topic); + String payload = objectMapper.writeValueAsString(positionData); mqttClient.publish(topic, payload, (message, e) -> resultHandler.onResult(e == null, e)); } catch (JsonProcessingException e) { resultHandler.onResult(false, e); |