You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems messages are put into a queue and held for up to 1 second. I see this in the debug logs receivedreceivedreceived before I see about to send a messageabout to send a messageabout to send a message no matter what the rate from the serial device to 2mqtt it is holding those messages and shipping them off every 1 second.
2023-10-27T13:36:58.894+0530 debug adapter/service.go:172 received a message from source device {"message": "{data:{\"message\":\"metrics\",\"uptime\":46028069,\"altitude\":1072.49,\"pressure\":97675.58,\"temp\":71.66,\"heading\":83.83,\"accelX\":26.47,\"accelY\":-63.31,\"accelZ\":993.08,\"gyroX\":26.47,\"gyroY\":-63.31,\"gyroZ\":993.08}\r, others:map[], timestamp:2023-10-27 13:36:58.894284234 +0530 IST m=+2.317788558", "adapterName": "adapter1", "provider": "raw"}
2023-10-27T13:36:59.225+0530 debug adapter/service.go:172 received a message from source device {"message": "{data:{\"message\":\"metrics\",\"uptime\":46028402,\"altitude\":1072.62,\"pressure\":97675.14,\"temp\":71.66,\"heading\":83.98,\"accelX\":26.35,\"accelY\":-63.56,\"accelZ\":993.32,\"gyroX\":26.35,\"gyroY\":-63.56,\"gyroZ\":993.32}\r, others:map[], timestamp:2023-10-27 13:36:59.224778851 +0530 IST m=+2.648283101", "adapterName": "adapter1", "provider": "raw"}
2023-10-27T13:36:59.556+0530 debug adapter/service.go:172 received a message from source device {"message": "{data:{\"message\":\"metrics\",\"uptime\":46028735,\"altitude\":1072.85,\"pressure\":97675.38,\"temp\":71.66,\"heading\":83.46,\"accelX\":26.35,\"accelY\":-63.68,\"accelZ\":993.32,\"gyroX\":26.35,\"gyroY\":-63.68,\"gyroZ\":993.32}\r, others:map[], timestamp:2023-10-27 13:36:59.555906296 +0530 IST m=+2.979410564", "adapterName": "adapter1", "provider": "raw"}
2023-10-27T13:36:59.682+0530 debug mqtt/device.go:134 about to send a message {"adapterName": "adapter1", "message": "{data:{\"message\":\"metrics\",\"uptime\":46028069,\"altitude\":1072.49,\"pressure\":97675.58,\"temp\":71.66,\"heading\":83.83,\"accelX\":26.47,\"accelY\":-63.31,\"accelZ\":993.08,\"gyroX\":26.47,\"gyroY\":-63.31,\"gyroZ\":993.08}\r, others:map[mqtt_qos:0 mqtt_topic:], timestamp:2023-10-27 13:36:58.894284234 +0530 IST m=+2.317788558"}
2023-10-27T13:36:59.682+0530 debug mqtt/device.go:134 about to send a message {"adapterName": "adapter1", "message": "{data:{\"message\":\"metrics\",\"uptime\":46028402,\"altitude\":1072.62,\"pressure\":97675.14,\"temp\":71.66,\"heading\":83.98,\"accelX\":26.35,\"accelY\":-63.56,\"accelZ\":993.32,\"gyroX\":26.35,\"gyroY\":-63.56,\"gyroZ\":993.32}\r, others:map[mqtt_qos:0 mqtt_topic:], timestamp:2023-10-27 13:36:59.224778851 +0530 IST m=+2.648283101"}
2023-10-27T13:36:59.683+0530 debug mqtt/device.go:134 about to send a message {"adapterName": "adapter1", "message": "{data:{\"message\":\"metrics\",\"uptime\":46028735,\"altitude\":1072.85,\"pressure\":97675.38,\"temp\":71.66,\"heading\":83.46,\"accelX\":26.35,\"accelY\":-63.68,\"accelZ\":993.32,\"gyroX\":26.35,\"gyroY\":-63.68,\"gyroZ\":993.32}\r, others:map[mqtt_qos:0 mqtt_topic:], timestamp:2023-10-27 13:36:59.555906296 +0530 IST m=+2.979410564"}
I have tried setting transmit_pre_delay: 10ms and also 0s on the MQTT side, so I don't think this is where the delay is being introduced.
Is any way to disable this queueing and ship then immediately?
Thanks!
The text was updated successfully, but these errors were encountered:
hi @gpabdo thanks to report this issue.
I do not think we have a delay in message queue. The message queue is acting as buffer. I have modified the time.sleep to act on a valid values. If you set 0s this sleep will be skipped. this change is available in the main branch https://github.com/mycontroller-org/2mqtt/releases/tag/development
I will have a look into the queue code and fix it if I find a delay there.
It seems messages are put into a queue and held for up to 1 second. I see this in the debug logs
received
received
received
before I seeabout to send a message
about to send a message
about to send a message
no matter what the rate from the serial device to 2mqtt it is holding those messages and shipping them off every 1 second.I have tried setting
transmit_pre_delay: 10ms
and also0s
on the MQTT side, so I don't think this is where the delay is being introduced.Is any way to disable this queueing and ship then immediately?
Thanks!
The text was updated successfully, but these errors were encountered: