Missing Samples of Large data [message #1809138] |
Wed, 10 July 2019 06:38 |
n m Messages: 1 Registered: July 2019 |
Junior Member |
|
|
I am trying to send data of around 500 tags (changing data per second) from Paho Mqtt to Cloud. Initialy getting all data . But after some time it starts loosing the samples.
Tried changing Keep Alive Time Checked on Wireshark to monitor the traffic.
Part of my code
def queue_consumer(queue): global TestCount
global responseList
while True:
TestCount=0
for items in range(0, queue.qsize()):
responseList.append(queue.get_nowait())
queue.task_done()
item1="topicName"
if item1 is None:
print("BREAKKK")
break
else:
mqttmessage1 = json.dumps(responseList)
objClient = ConnectionClient()
objClient.client.publish("topicName", mqttmessage1 , qos=1)
responseList=[]
del objClient
time.sleep(1) #time after which the next items in queue would be processed for publishing
I except all data to be published at cloud with timestamp
|
|
|
Powered by
FUDForum. Page generated in 0.03533 seconds