MQTT optimization | Feature Requests | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





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

Register Lost password?
sp_Feed sp_TopicIcon
MQTT optimization
Avatar
ArbitraryUserN01
New Member
Forum Posts: 1
sp_UserOfflineSmall Offline
1
June 27, 2017 - 7:18 am
sp_Permalink sp_Print

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.

Avatar
CoreInside
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
2
November 22, 2017 - 4:56 pm
sp_Permalink sp_Print

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.

Avatar
CoreInside
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
3
November 22, 2017 - 5:10 pm
sp_Permalink sp_Print

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!

Avatar
JasonW

Forum Posts: 23
sp_UserOfflineSmall Offline
4
November 29, 2017 - 9:07 am
sp_Permalink sp_Print sp_EditHistory

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:
11 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

epicpaymentsny

DanielBobby

mercedeszw18

ujuxoketate

olihfez

winnieeq69

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee