aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-03-10 15:18:18 -0800
committerAnton Tananaev <anton@traccar.org>2023-03-10 15:18:18 -0800
commit4fc5d0b58b3667ee1bb81515deef6440225af76b (patch)
treef0f0d758f494a9eddc275bf25db0215dcb96f2c5 /src/main/java
parentf4d10160d9513eb190169d0ab335c3d99c6d4e31 (diff)
downloadtrackermap-server-4fc5d0b58b3667ee1bb81515deef6440225af76b.tar.gz
trackermap-server-4fc5d0b58b3667ee1bb81515deef6440225af76b.tar.bz2
trackermap-server-4fc5d0b58b3667ee1bb81515deef6440225af76b.zip
Clean up MQTT forwarder
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/forward/EventForwarderMqtt.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/forward/EventForwarderMqtt.java b/src/main/java/org/traccar/forward/EventForwarderMqtt.java
index dc95cb4e2..7f4e29384 100644
--- a/src/main/java/org/traccar/forward/EventForwarderMqtt.java
+++ b/src/main/java/org/traccar/forward/EventForwarderMqtt.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022 Anton Tananaev (anton@traccar.org)
+ * Copyright 2022 - 2023 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,8 +21,6 @@ import com.hivemq.client.mqtt.datatypes.MqttQos;
import com.hivemq.client.mqtt.mqtt5.Mqtt5AsyncClient;
import com.hivemq.client.mqtt.mqtt5.Mqtt5Client;
import com.hivemq.client.mqtt.mqtt5.message.auth.Mqtt5SimpleAuth;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.traccar.config.Config;
import org.traccar.config.Keys;
@@ -32,7 +30,6 @@ import java.util.UUID;
public class EventForwarderMqtt implements EventForwarder {
- private static final Logger LOGGER = LoggerFactory.getLogger(EventForwarderMqtt.class);
private final Mqtt5AsyncClient client;
private final ObjectMapper objectMapper;
@@ -63,7 +60,7 @@ public class EventForwarderMqtt implements EventForwarder {
String host = url.getHost();
int port = url.getPort();
client = Mqtt5Client.builder()
- .identifier("traccar-" + UUID.randomUUID().toString())
+ .identifier("traccar-" + UUID.randomUUID())
.serverHost(host)
.serverPort(port)
.simpleAuth(simpleAuth)