Skip to content

One second buffer #3

Open
Open
@gpabdo

Description

@gpabdo

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 see about 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.

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions