# MQTT-Node Packet Size Limit?

**URL:** <https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027>\
**Category:** General\
**Created:** [17 April 2020 18:34 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027 "2020-04-17T18:34:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![drowsylogic](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drowsylogic/32/20147_2.png) [@drowsylogic](https://discourse.nodered.org/u/drowsylogic)\
**Post date:** [17 April 2020 18:34 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027/1 "2020-04-17T18:34:38Z")

</div>

I am working to send data using the standard MQTT node to a remote broker.  
I have an issue that I believe is related to packet size.  
I send a "Hello World" Payload to my remote broker and it is received on the remote broker.  
I send a large data set of integers as the payload and the message is not received.  
My data that is in the payload is 0.196608 Megabytes in size.  
Does the MQTT Client used by node-red have some limiting factor?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 April 2020 18:38 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027/2 "2020-04-17T18:38:33Z")

</div>

It could be the remote broker.

Try sending similar size payload to another remote or even a local broker as a test.

---

<div class="post-metadata">

**Author:** ![drowsylogic](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drowsylogic/32/20147_2.png) [@drowsylogic](https://discourse.nodered.org/u/drowsylogic)\
**Post date:** [17 April 2020 18:59 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027/3 "2020-04-17T18:59:51Z")

</div>

That was my first thought too!  
The remote broker has a limit of 0.256MB.  
[Broker Documentation](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=2ahUKEwjHze6YifDoAhUBYawKHVC6AksQFjABegQICxAE&url=https%3A%2F%2Fdocs.losant.com%2Fmqtt%2Foverview%2F&usg=AOvVaw3RmifM3G9vxAhLAdAjxN0q)

That's why I'm now questioning the Node-Red side of things.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 April 2020 19:05 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027/4 "2020-04-17T19:05:47Z")

</div>

That's a bit odd. Is it cloud based? The limit is normally around 250MB not 256KB

Have you tried a local mosquito install?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [17 April 2020 19:17 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027/5 "2020-04-17T19:17:04Z")

</div>

@knolleary Nick is there a limit to the size of an MQTT packet?  
Is there a limit to the size of msg.payload?  
Are they documented anywhere?

---

<div class="post-metadata">

**Author:** ![drowsylogic](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drowsylogic/32/20147_2.png) [@drowsylogic](https://discourse.nodered.org/u/drowsylogic)\
**Post date:** [17 April 2020 20:28 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027/6 "2020-04-17T20:28:35Z")

</div>

I used mqttfx to test it.  
I verified Losant's payload size limit by uploading a dummy 256kb json file.  
[MOCK\_DATA\_3.json](https://discourse.nodered.org/uploads/short-url/4M0KFneHlI0lOcj0YiIooVtVSCi.json) (255.5 KB)  
Anything over this size breaks the communication.

I am really just stuck trying to figure out if there is a limiting factor on the node red side.  
Does the built-in node-red MQTT-node use Mosquitto as the client?  
If so I suppose I can try that too.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [17 April 2020 20:35 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027/7 "2020-04-17T20:35:43Z")

</div>

I'm not aware of the Mqtt client we use imposing any restrictions other than those the protocol specifies.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [18 April 2020 06:33 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027/8 "2020-04-18T06:33:41Z")

</div>

> [@drowsylogic](#):
>
> I am really just stuck trying to figure out if there is a limiting factor on the node red side

I've sent you test data to my broker and back again and it seems to have worked fine

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/b/5bf386f2502b0300476764ed25ed03e0160d8306.jpeg)

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [18 April 2020 06:42 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027/9 "2020-04-18T06:42:39Z")

</div>

Also tested it out using [mqtt.eclipse.org](http://mqtt.eclipse.org) and that was fine as well

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/0/e09b8d87b348feaeacf113f92f22ced2ebe51f2d.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 June 2020 06:42 UTC](https://discourse.nodered.org/t/mqtt-node-packet-size-limit/25027/10 "2020-06-17T06:42:41Z")

</div>

Closed on 17 June 2020 06:42 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
