diff options
Diffstat (limited to 'src/main/java/org/traccar/forward')
-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); |