MQTT Maximum Message count Maximum Topic count

0 votes
Hey guys,

I have a question about mqtt. What is the maximum number of messages I can send to the broker? Is there a limit? My MQTT.fx clients numbers the messages with a ID. I don't know if it is part of mqtt (which can overflow) or if this is just a solution of mqtt.fx.

Is there a maximum count of the currently active topics?

T
Jul 10, 2020 in IoT (Internet of Things) by Dingsbums
• 120 points
4,725 views

1 answer to this question.

0 votes

Hello @ Dingsbums ,

The number of topics is going to be set by the number of topics that clients subscribe to as this list is what is searched when a new message is published, so assuming this list is kept I some kind of tree structure (which is very likely due to the hierarchical nature of topics) then the limit is likely to be the amount of memory on the server (assuming 64bit host).

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.

Hope it is helpfull!!
Thank you!

answered Jul 27, 2020 by Niroj
• 82,840 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

What is the maximum message length for a MQTT broker?

It's not entirely clear what you're asking ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
9,462 views
0 votes
1 answer

Changing message format in KURA MQTT cloud client

The Eclipse Kura communicates with a MQTT ...READ MORE

answered Jul 29, 2018 in IoT (Internet of Things) by DataKing99
• 8,250 points
1,172 views
0 votes
1 answer

Invalid MQTT publish topic on Google Cloud IoT

It's pretty simple. You have the incorrect ...READ MORE

answered Feb 27, 2019 in IoT (Internet of Things) by Upasana
• 8,620 points
2,258 views
0 votes
1 answer

MQTT server sending a message to a client declaring unauthorization

It would return a CONNACK packet with ...READ MORE

answered Apr 25, 2019 in IoT (Internet of Things) by Upasana
• 8,620 points
1,201 views
0 votes
1 answer

MQTT protocol connection error

Ok so you need two libraries to ...READ MORE

answered Jul 6, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points

reshown Jul 6, 2018 by Vardhan 3,067 views
0 votes
1 answer
0 votes
0 answers

Install MQTT on windows 10

How do I install MQTT on windows ...READ MORE

Jul 9, 2019 in Others by Greg
1,441 views
0 votes
1 answer

How to add https security for Node js?

You need to add the key and cert to the createServer function. const options ...READ MORE

answered Aug 10, 2018 in Blockchain by digger
• 26,740 points
812 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP