BUG MQTT Engine: Server Settings: ClientID limited to 24characters

The MQTT Engine fails to create a connection to an MQTT server when the clientID is set to more than 24 characters.

For example, a clientID of 01234567890123456789012 works, but a clientID of 012345678901234567890123 fails.

Entries in the log file are the following:

MQTT spec says the client identifier must be between 1 and 23 characters.

edit: actually it says the server must support lengths between 1 and 23, and may allow longer ones, but that is up to the server.

Thanks @Kevin.Herron for digging into this. I thought it was failing on the addition of an “_” character, but dug in and found it was the length that was the issue.

If the MQTT Engine is going to observe that limitation, it should do some data entry validation or at least have that information in the header of the text box of the ClientID on the web interface to help users. Also, the log files that are produced aren’t helpful to the layman in pointing to what the real issue is.

Yes, agree. @wes0johnson should be looped in.

I also agree. This required limitation was removed in the latest module versions (3.4.12 for Ignition7 and 4.0.7 for Ignition8). If the MQTT Client ID is user specified and over 23 chars - it will be accepted. Any internal programmatically generated MQTT client IDs will remain under 23 chars.

Thank you. I forgot to mention I was using 4.0.6 of the MQTT Engine.