Commit Graph

21 Commits

Author SHA1 Message Date
Johan Ström 2d958750b5 Handle large/chunked/fragmented MQTT messages properly (#2571)
* MQTT: handle large/chunked/fragmented messages properly

If a message spans multiple TCP packets it must be buffered before
delivered to LUA. Prior code did not do this at all, so this "patch"
really adds proper handling of fragmented MQTT packets.
This could also occur if multiple small messages was sent in a
single TCP packet, and the last message did not completely fit in that
packet.

Introduces a new option to the mqtt.Client constructor:
max_publish_length which defaults to 1024

Introduces a new 'overflow' callback.

Fixes issue #2308 and proper fix for PR #2544.

* mqtt.md: clarified heap allocation

* mqtt: ensure ack is sent for overflowed publish

If QoS is used we should still acknowledge that we received it, or server might retransmit it later.
2018-11-30 22:12:46 +01:00
dbaumgarten ec6ed6f868 Better documentation for mqtt:lwt() (#2128) 2017-10-06 00:31:41 +02:00
Marcel Stör 003c2453c3 Add note to mqtt:subscribe
Fixes #2039
2017-08-22 22:05:24 +02:00
Philip Gladstone 66ffa6cdc4 Fix the error callback from not being called sometimes (#1683)
* Fix the error callback from not being called sometimes
* Moved the setting of the reconnect status to after the connack is recevied
* Increase the irom0_seg size
* Updated the documentation
* Make it clearer that autoreconnect is deprecated
2017-04-04 22:22:04 +02:00
Marcel Stör b26ed97246 Improve MQTT client example, fixes #1792 2017-02-12 17:04:37 +01:00
Alexis Lothoré f176697e13 Document user/pass as optional in MQTT client doc (#1727) 2017-01-15 19:27:56 +01:00
Marcel Stör daed2b5b6e Add SSL/TLS remarks (#1333) 2016-06-01 21:34:02 +02:00
Rick Lettow ca87271692 Update mqtt documentation indicating the limitations of the subscribe(),
unsubscribe() and publish() callback functions.
2016-04-02 12:01:38 -05:00
philip 426e805c43 Initial version of unsubscribe 2016-03-20 18:44:06 -04:00
jfollas 354b9e9684 Merge branch 'dev' into mqtt-connack 2016-03-17 19:59:02 -04:00
jfollas aa50eca4f6 Refactoring of MQTT module to consolidate duplicate code into a function
- per @pjsg's suggestion
2016-03-06 20:11:16 -05:00
jfollas 0abe2fe964 MQTT Client - CONNACK processing
- Process the CONNACK message received from the broker after Connect
- Provide feedback to Lua via failure callback on client:connect()
- Also provide failure information for other situations not covered by CONNACK
2016-03-06 16:33:57 -05:00
Marcel Stör 202cc1a12a Add meta-info block to every module doc page 2016-03-06 08:56:28 +01:00
Marcel Stör e9cde6eb34 Correct secure option in MQTT documentation
Fixes #996
2016-02-06 22:28:07 +01:00
Arnim Läuger f42fdb1a76 also fix cb prototype description 2016-01-30 10:23:27 +01:00
Arnim Läuger 1697126a15 terminate example 2016-01-29 22:40:15 +01:00
devsaurus 9741c8f1b5 fix #527 2016-01-28 23:46:35 +01:00
devsaurus 1c32d20502 improve error checking in mqtt module
connect(), close(), subscribe(), publish()
2016-01-28 21:36:38 +01:00
Arnim Läuger 3124a0e6a8 add autoconnect option for publish() and update optional parameters 2016-01-26 22:55:33 +01:00
Marcel Stör 96a05dcd41 Fix syntax for optional parameters for a few modules 2016-01-17 14:14:34 +01:00
Marcel Stör 6ef4fe1840 Transfer enduser-setup and mqtt docs 2016-01-10 22:52:05 +01:00