MQTT Round trip latency?

Hi, is there any example for MQTT Round trip latency?

What’s MQTT and what does it have to do with Python?

MQTT is communication protocol, that work on app level.
It is often used to transfer sensor data (and many more examples).
Python support MQTT and offers libraries for it.

Latency?

Are you asking how fast python’s MQTT librarys are in a real world application?

You may get typcial answers, but would need to do a PoC and measure for your application.

I’m trying to do Stress test between several protocols

You are best off running the tests yourself against a benchmark test to see what is suitable for your needs.

I did the test, just don’t know how to obtain MQTT Round trip latency?

I would log timestamps at important points in your code and then computer the times that are important to you from these timestamps.

If there are multiple programs running then you would need to coralate the logs from all systems to get your timings.

Make sure if you have mutltiple computers used in the tests that they are all using NTP to make sure that the time is synch’ed on them all.