changed some changes
This commit is contained in:
parent
860bd29ec2
commit
938f2821fd
@ -2,7 +2,7 @@ import org.eclipse.paho.client.mqttv3.*
|
|||||||
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence
|
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
|
||||||
class MqttSubscriber() : MqttCallbackExtended {
|
class MqttSubscriber : MqttCallbackExtended {
|
||||||
private val broker = System.getenv("BROKER") ?: "tcp://mqtt.k8s.kmlabz.com:1883"
|
private val broker = System.getenv("BROKER") ?: "tcp://mqtt.k8s.kmlabz.com:1883"
|
||||||
private val clientId = MqttClient.generateClientId()
|
private val clientId = MqttClient.generateClientId()
|
||||||
private val persistence = MemoryPersistence()
|
private val persistence = MemoryPersistence()
|
||||||
|
@ -14,5 +14,5 @@ fun main() = runBlocking{
|
|||||||
resultProcessor.mapToProcess=resultMap
|
resultProcessor.mapToProcess=resultMap
|
||||||
resultProcessor.process()
|
resultProcessor.process()
|
||||||
}
|
}
|
||||||
delay(20000L)
|
delay(System.getenv("WAITTIME").toLong()*2)
|
||||||
}
|
}
|
@ -1,4 +1,3 @@
|
|||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.time.ZoneId
|
import java.time.ZoneId
|
||||||
import java.time.format.DateTimeFormatter
|
import java.time.format.DateTimeFormatter
|
||||||
|
Loading…
Reference in New Issue
Block a user