MQTT optimization | Feature Requests | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
MQTT optimization
No permission to create posts
June 27, 2017
7:18 am
Avatar
ArbitraryUserN01
New Member
Members
Forum Posts: 1
Member Since:
June 27, 2017
sp_UserOfflineSmall Offline

The publish url for MQTT is unnecessarily long for a protocol designed to be efficient.

"channels/123456/publish/fields/field1/APIKEY"

Could be shortened to, for example:

"c/123456/1/APIKEY"

This saves 27 characters.

November 22, 2017
4:56 pm
Avatar
CoreInside
New Member
Members
Forum Posts: 2
Member Since:
November 22, 2017
sp_UserOfflineSmall Offline

I totally agree!

For instance, using popular Arduino library PubSubClient it is impossible to send data for all 8 fields at once because total string length exceeds predefined array of 128 bytes.

November 22, 2017
5:10 pm
Avatar
CoreInside
New Member
Members
Forum Posts: 2
Member Since:
November 22, 2017
sp_UserOfflineSmall Offline

As an example 160 bytes can become 115 without sacrificing ease of human-reading:

channels/123456/publish/ABCDEFGHIJKLMNOP/field1=-123.45&field2=-123.45&field3=-123.45&field4=-123.45&field5=-123.45&field6=-123.45&field7=-123.45&field8=-123.45

c/123456/p/ABCDEFGHIJKLMNOP/f1=-123.45&f2=-123.45&f3=-123.45&f4=-123.45&f5=-123.45&f6=-123.45&f7=-123.45&f8=-123.45

Please support the short form!

November 29, 2017
9:07 am
Avatar
JasonW

MathWorks
Members
Forum Posts: 28
Member Since:
October 21, 2016
sp_UserOfflineSmall Offline

You can easily adjust the Ardunio PubSubClient library to accommodate larger strings.

In PubSubClient.h just increase MQTT_MAX_PACKET_SIZE.

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

josephrj11, dennis55, jillhp4, tabathawg69, MarinaMa, Susandom

Administrators: Hans: 387, lee: 457