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!