OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

mqtt message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [OASIS Issue Tracker] Commented: (MQTT-13) Topic name has an upper length limit of 32,767 characters ?

    [ http://tools.oasis-open.org/issues/browse/MQTT-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33536#action_33536 ] 

Peter Niblett commented on MQTT-13:

There's clearly inconsistency between the words in 2.2 and Appendix A which we need to resolve.  

There's a hard upper limit of 65535 bytes because of the two byte length field that precedes the UTF-8 string. The reference to characters rather than bytes in 2.2 is interesting. It's either
a) A hangover from an earlier spec in which the field was single-byte ASCII characters (in which case the intent was to limit you to 32767 bytes)
b) An attempt to specify 65535 bytes based on an assumption that the UTF-8 characters would be at most 2 bytes long.  As they can be three or four bytes long, you could theoretically exceed 65535 bytes and still be under 32767 characters.

So taken literally, an implementation today would have to be able to cope with 65535 bytes anyway.

I think we should remove the limit, leaving just the implicit limit of 65535 bytes imposed by the length prefix.

> Topic name has an upper length limit of 32,767 characters ?
> -----------------------------------------------------------
>                 Key: MQTT-13
>                 URL: http://tools.oasis-open.org/issues/browse/MQTT-13
>             Project: OASIS Message Queuing Telemetry Transport (MQTT) TC
>          Issue Type: Improvement
>          Components: core
>            Reporter: Rahul Gupta
> Snippet from Section 2.2 of  v3.1 specification. 
> ---------------------------------------------------------------
> The topic name is a UTF-encoded string. See the section on MQTT and UTF-8 for more information. Topic name has an upper length limit of 32,767 characters.
> Snippet in Appendix A - 
> --------------------------------
> The following principles apply to the construction and content of a topic tree:
> > The length is limited to 64k but within that there are no limits to the number of
> levels in a topic tree.
> Should the topic length on PUBLISH command be restricted to 32,767 characters ?

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]