mqtt 发送消息过多_MQTT代理的最大消息长度是多少?

I am using the node.js mosca MQTT broker for some internet of things (iot) application.

What is the maximum message length that a topic can receive for the mosca broker? What are the factors that constrain the message length?

If I want to increase the message length, is there a configuration parameter I can modify or which part of the code can I change?

解决方案

It's not entirely clear what you're asking here, so I'll answer both possibilities.

The length of the actual topic string is at most 65536 bytes. This is a limit imposed by the mqtt spec, you can't change it. It is also worth noting that the topic is encoded with utf-8, so you may have less than 65536 characters available.

The payload of the message is limited to 268,435,456 bytes. Again, this is defined by the spec.

If you are routinely approaching either of these limits you should be thinking about whether what you are doing is sensible.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值