-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow to publish message #44
Comments
Hey @law-ko, thanks for reaching out about this issue, and sorry for the delay in getting a response. |
I would be curious to know the value of this macro Let us know if that solved your issue. Thanks, |
Hi! Im facing the exact same issue. Have tried to modify |
Digging deeper on coreMQTT-Agent found that the publish message waits for a "publish completition" from the agent. The blocking behavior is due to the I can't seem to find where to speed up this behavior. |
Hey @aidiaz, you could try increasing the priority of the MQTT task to ensure it's the highest priority? Or maybe reducing the the send block time might also help with that? I'm just thinking that conceptually either of these could be causing the delay in when messages get published. If modifying these don't work I can look further into the cause of the delay. |
|
Hi @aidiaz, wondering if you have tried any other network activtiy on the HW setup (other than MQTT) you have, if so, what latency are you getting? |
By HW do you mean my esp32 board? Or Networks gateway/router. I have tried several boards, devkits, wifi networks, sharing from cellphone. No differences at all. |
Hi @law-ko, @aidiaz, If CPU is blocking on some other tasks, it doesn't have any performance to execute publishing until unblock. Thanks. |
Hi @ActoryOu, will be checking the statistics, but Im pretty sure nothing is blocking since already tried eliminating every other task in our program |
@ActoryOu so I took some time to do test with all the suggestions here but still can't publish messages faster than 3 seconds between them. I blocked some naming on the statistics below. aws_pub_task enqueues the data into the DataMQTT task where the queue is read in the loop. Both task have high priority respect the rest. |
Found this https://www.esp32.com/viewtopic.php?t=32253 where a TLS network context modification is suggested. Still not working as expected. |
I only just saw this now. I should point out that some of those changes have already been integrated into this repo. |
@txf-, thank you for reporting back on the forum post and on this issue. @aidiaz did the solution provided in the above forum post work for you? |
@AniruddhaKanhere, I have already checked where the program blocks, if you read the previous replies (#44 (comment)) No solution found so far, please help us! |
Hello @aidiaz, very sorry to hear that your issue has not been solved yet. Let us know if that helps. |
@AniruddhaKanhere unfortunately I'm currently working on a |
Hello @aidiaz, Yes, since you are working on |
Closing this issue due to lack of response. |
Describe the bug
We have realized the time to get the message published to AWS IoT takes around 2 seconds. Any method to reduce this time?
System information
Running on ESP32
Screenshots or console output
From sending publish request (59746) to MQTTPublishDone (61696): 1950
The code to publish to AWS IoT
The text was updated successfully, but these errors were encountered: