简体   繁体   English

MQTT 连接消耗了多少数据

[英]How much data consumed on MQTT connection

I wonder how much data will be consumed (approximately) over say one month if I just connected to an MQTT server.(without sending or receiving any messages).我想知道如果我只是连接到 MQTT 服务器(不发送或接收任何消息),一个月内(大约)会消耗多少数据。

I need to calculate it to measure what data plan should I recharge for my sim card used in IoT application.我需要计算它来衡量我应该为 IoT 应用程序中使用的 SIM 卡充值的数据计划。

Thanks谢谢

Last time I had to do something similar I simulated the traffic of a month.上次我不得不做类似的事情时,我模拟了一个月的流量。

Because computers are much faster than IoT devices, just use any kind of high-level library to send the traffic the IoT devices would be sent in a month and then measure the TCP traffic.由于计算机比物联网设备快得多,因此只需使用任何一种高级库发送物联网设备在一个月内发送的流量,然后测量 TCP 流量即可。

Edit: fix broken link as suggested by @Jacob编辑:按照@Jacob 的建议修复断开的链接

I hope that you can find your answers here:我希望你能在这里找到你的答案:

MQTT data usage MQTT 数据使用

By the way... The client sets the keep alive value when it sends a CONNECT request to the server (aka the broker ).顺便说一句......客户端在向服务器(又名broker )发送 CONNECT 请求时设置保持活动值。 Potentially, if the client choose 0 as keep alive value, no data is consumed except for setup connection.潜在地,如果客户端选择 0 作为保持活动值,则除了建立连接之外不会消耗任何数据。

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

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