Welcome to the Raspberry Pi forums.
cutee wrote: ↑
Fri May 17, 2019 7:57 pm
i am trying to publish 100 to 10000 random number 100 times in interval of 0.01 s on mqtt tcp\ip protocol but time measured by the client who subscribe to the broker is not right it's
the time for sending 10000 data is lower than the time 100 ,1000 data t
but when i try to change the interval of time to 0.1 to 1s the time measure in right.
what is the limits of data to transmit data in real time on mqtt protocol tcp-ip
and what can cause such problem
ps : the client is on the same pi
You have not mentioned what model of RPi board you are using, or what Operating System is installed on it. Nor how your MQTT infrastructure is implemented. So this is general advice only.
Raspbian, as a version of Linux, is not a Real Time Operating System. It is a multi-user time-shared operating system which can choose to allocate processing resources to tasks other than your application. And that might depend on what else your RPi is being used for.
Perhaps this is a case where the useful limits of reliable performance are best determined by trial and error in your own particular circumstances?