22 Commits

Author SHA1 Message Date
372ab7b374 feat: Introduces outbox limit
A memory limit for the outbox can be configured.
User will not be able to publish or enqueue if the new message goes
beyond the configured limit.
2023-06-13 15:59:55 +02:00
122875bf8a refactor: Group access to output buffer in mqtt_connection_t
- Moves mqtt_connect_info to mqtt_connection_t.
  - Removes outbound_message in favor of accessing it trough connection.
2023-06-13 11:56:05 +02:00
32102558d3 Feature: Enable SUBSCRIBE to multiple topics
- Adds an api for multiple topics on SUBSCRIBE message.

Apply 2 suggestion(s) to 1 file(s)

Removing headers

y
2023-02-03 14:19:24 +01:00
2c2e6f38b5 Changes the moment we update keepalive_tick.
In order to keep sending keep alive messages in the scenario were client
publish too often with QoS0 the keepalive is updated when the response
is received.
2022-04-07 09:14:03 -03:00
de47f1c341 add payload to MQTT_EVENT_SUBSCRIBE
+ documentation
+ cleanup logging

Closes https://github.com/espressif/esp-mqtt/issues/200
Merges https://github.com/espressif/esp-mqtt/pull/203
2021-10-04 10:38:02 +02:00
8bb4a26f46 Config: Add a new option to use incremental message id
This option is off by default, so the client still uses
random message id unless CONFIG_MQTT_MSG_ID_INCREMENTAL is set

Closes https://github.com/espressif/esp-mqtt/issues/176
2020-12-09 10:12:57 +01:00
8562437c8a mqtt_config: Add config value to disable keepalive mechanism
Added a separate config value to allow disable the keepalive mechanism (and keep the existing API the same)
Internally though, the keepalive value (in connect_info) is in line with 3.1.2.10 Keep Alive from mqtt spec:
* keepalive=0: Keep alive mechanism disabled (server not to disconnect the client on its inactivity)
* period in seconds to send a Control packet if inactive

Closes https://github.com/espressif/esp-mqtt/issues/179
2020-11-18 14:41:44 +01:00
b9db8d9020 Use size_t for all lengths
Previously, uint32_t and size_t were used interchangeably. These types are
interchangeable on Xtensa gcc (uint32_t == size_t == unsigned int), but not on most
other 32-bit gcc architectures (where uint32_t == unsigned long, size_t ==
unsigned int).
2020-10-09 16:33:12 +11:00
7087193093 mqtt_msg: address const correctness 2020-01-25 21:57:02 +01:00
8ab095b5bb Merge branch 'feature/protocol_ver_rt_cfg' into 'master'
MQTT: Add runtime selection of mqtt protocol version

See merge request espressif/esp-mqtt!54
2020-01-20 16:41:55 +08:00
7ac0a42831 MQTT: Add runtime selection of mqtt protocol version
Add config option for selecting protocol version at runtime.

This also fixed MQTT protocol version 3.1 which wasnt working with the original implementation

Closes https://github.com/espressif/esp-idf/issues/4448
Closes IDFGH-2311
Closes IDF-1320
2020-01-09 14:49:33 +08:00
ab1e8d7969 Support larger buffers and messages
Use `uint32_t` instead of `uint16_t` for message and buffer lengths.
This is necessary for receiving messages that are larger than 65K.
2020-01-08 15:00:10 -05:00
67042a1315 ADD: Get the response code from a failing connection.
This commit adds an event information "connect_return_code" that is written
when the client state is MQTT_STATE_INIT, and the connection fails.

This event info can then be written by the user app to find out the reason
of the fail connection.

Merges https://github.com/espressif/esp-mqtt/pull/100
2019-10-09 09:23:53 +02:00
18b6f2c582 Fixed formatting for all files to comply with idf style formats 2019-05-15 13:40:14 +02:00
60cdb79a67 mqtt_msg: avoid uncasting const to mqtt topic and data pointers 2019-05-15 13:40:14 +02:00
fd564b1f17 client receive: refactor receive to read only one message to fragment only payload for longer messages
Closes #113
2019-05-06 11:23:28 +02:00
0450bd0093 MQTT Client: Added support for receiving empty payload 2019-04-26 17:07:04 +02:00
6a0d1e7bff support for qos1 and qos2 message retrasmission on reconnect 2019-02-13 15:21:32 +01:00
e0bbbebc08 mqtt support for sending fragmented messages and full mqtt message length support 2019-01-03 09:14:34 +01:00
8bd8583216 Add mqtt_get_connect_session_present 2018-10-15 11:29:47 +02:00
4bc37bb8db fix handling of large messages (#40) 2018-05-03 20:46:06 +07:00
083f8789ac Add support outbox, changed API 2018-02-16 02:40:16 +07:00