简体   繁体   English

MQTT有效载荷大小,丢包,传输时间

[英]MQTT payload size, packet loss, transmission time

I have an MQTT client on an Intel Galileo board and the broker on my desktop. 我在英特尔Galileo板上有一个MQTT客户端,在我的台式机上有一个代理。 I'm interested in measuring 我有兴趣测量

  1. The payload size of a message 消息的有效负载大小
  2. packet loss rates 丢包率
  3. The transmission time between the client and the broker. 客户端和代理之间的传输时间。

Could anybody suggest the best way to do this? 有人可以建议最好的方法吗?

Thanks 谢谢

The Payload size is going to be pretty much determined by the message you send since the MQTT header is a fixed size on top of this. 有效负载大小将很大程度上取决于您发送的消息,因为MQTT标头在此之上是固定大小。 You can easily measure the packet size with something like Wireshark (network sniffing tool) 您可以使用Wireshark(网络嗅探工具)轻松测量数据包大小

Since MQTT runs over TCP loss shouldn't be a problem (apart from a performance impact) as they will get re-sent. 由于MQTT运行在TCP之上,因此丢失(除了对性能的影响之外)应该不是问题,因为它们将被重新发送。 And this is likely to be a function of the quality of the network you are using, wifi/cellular is likely to loose more than wired. 这很可能取决于您使用的网络的质量,wifi /蜂窝网络可能比有线网络失去更多的空间。 Again the best way to measure this will probably be with a network sniffer on both ends and comparing the traffic. 同样,衡量此问题的最佳方法可能是两端都使用网络嗅探器并比较流量。

The capture from the last point will probably cover the network transmission time for this, but if you want to include the broker handling time then best bet is to publish and subscribe from the same client and time the round trip time. 从最后一点捕获的内容可能会涵盖此时间的网络传输时间,但是如果要包括代理处理时间,那么最好的选择是从同一客户端发布和订阅,并安排往返时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM