You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Nick Cuneo (JIRA)" <ji...@apache.org> on 2016/08/19 22:54:20 UTC

[jira] [Created] (STORM-2049) MQTT Client ID Length Should Be Restrictive

Nick Cuneo created STORM-2049:
---------------------------------

             Summary: MQTT Client ID Length Should Be Restrictive
                 Key: STORM-2049
                 URL: https://issues.apache.org/jira/browse/STORM-2049
             Project: Apache Storm
          Issue Type: Bug
          Components: storm-core
            Reporter: Nick Cuneo


According the MQTT specification:
The Server *MUST* allow ClientIds which are between 1 and 23 UTF-8 encoded bytes in length, and that contain only the characters

"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" [MQTT-3.1.3-5].

 

The Server *MAY* allow ClientId’s that contain more than 23 encoded bytes.

When using MQTT spout with message brokers that don't allow names longer than 23 characters, storm is unable to connect to the broker.  

Here's how storm constructs the client ID, which can cause names to be longer than 23 characters.
{{String clientId = this.topologyName + "-" + this.context.getThisComponentId() + "-" +
                this.context.getThisTaskId();}}

Options:
Restrict the final length of the client ID to be less than 23 characters
Allow setting the clientID using MQTTOptions
Attempt to connect, if fail - trim the length and try again.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)