diff options
author | geduxas <gediminas.vileikis@gmail.com> | 2024-06-03 16:04:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-03 16:04:17 +0300 |
commit | b8ae04d5435fda76646da139fb0b74068c60caf7 (patch) | |
tree | f6666fadbf272b75fabe8f65bbdadaa1c98073b7 /src/main/java/org | |
parent | 64528b96da4a742070d5845a876b07ca66ad0be3 (diff) | |
download | trackermap-server-b8ae04d5435fda76646da139fb0b74068c60caf7.tar.gz trackermap-server-b8ae04d5435fda76646da139fb0b74068c60caf7.tar.bz2 trackermap-server-b8ae04d5435fda76646da139fb0b74068c60caf7.zip |
Wrong data published in MQTT (PositionForwarderMqtt)
It should publish positionData instead of topic element
Diffstat (limited to 'src/main/java/org')
-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); |