Releases: bertmelis/espMqttClient
Bugfixes and new features
- Fixed a connection that could get stuck during connecting
- Fixed memory corruption on high loads
- Experimental feature: a memory pool: be sure to read the section in the docs on
#define EMC_USE_MEMPOOL
. - Also: explicit dependencies are removed. While this breaks auto dependency management in various IDEs, the feature caused problems with multiple flavours of the dependency. I decided to just remove it completely. So yes, you will probably need to manually define the dependencies.
Enjoy!
As always: issues and discussions are free to use!
Improvements and updates
No big update on first sight, but there actually are significant improvements:
- ESP-IDF compatibility (using Arduino as component)
- Efficiency/memory usage improvement on incoming packets (under the hood)
- Improved dependency versions
- some housekeeping
Feature: multiple callbacks
This release brings multiple callbacks.
When setting EMC_MULTIPLE_CALLBACKS
to 1
, you can attach multiple callbacks to the same event. Removing a callback is also possible.
Minor code cleanup included.
Bugfix memory exhaustion
This bugfix release fixes a major bug that stayed under the radar. Updating your code is highly recommended!
When hitting low memory conditions and still sending messages, the outbox kept growing but without actual messages. Failures also weren't forwarded to the API. Furthermore, low memory also meant the CONNECT packet could not be allocated so there was no way to connect and process the queue (and thus freeing up memory).
Thanks to @MichaelDvP for discovering and testing.
Bugfix reconnection
This bugfix release fixes an issue where the client could get stuck in a disconnected state when using the internal task.
The connect
-call now returns false when the call couldn't be completed successfully. This wasn't always the case in the previous versions. As such, the behaviour is changed but the older versions were actually not behaving as intended.
Docs have been updated.
Fix compilation quibbles
Although not catched by Github Actions, compilation could pose some problems.
Fixed an include path, added Arduino CLI compilation testing and fix the assert
.
v1.4.2 Bugfix reconnect error
When a disconnect happened while a packet was being sent, the client would not recover in certain (default) conditions and get stuck in a disconnected state.
Thanks @lumapu for finding out and testing the solution.
I also did minor code cleanup.
Bugfix: retransmit
In the previous release, retransmission was implemented. That is, the necessary code was put up. However, this code wasn't called.
Also, because of an ugly typecast, the code wouldn't compile anymore with -Werror
.
This release fixes both these issues.
Retransmission and other improvements
A new release with a few improvements:
- retransmission: after a fixed time, when a message is not acknowledged, it'll be retransmitted with respect for message ordering
- PSRAM is included in the free memory calculation.
- Some brokers don't allow sending packets before the MQTT connection is acknowledged (AWS in particular). The client now can handle this.
- Logging can be enabled/disabled specifically for espMqttClient
- Users can use their own worker task on ESP32.
The examples have been optimized a bit. Especially (re)connecting has been updated to make use of the returned variable, indicating a successful connect.
As always, use Issues or Discussions if you encounter something's off or you need something changed.
Bugfix release: crash on ping request
In this release we have a few improvements:
- no more crashes when a PING request is made
- Nagle is correctly disabled
- You can convert error codes to text