Skip to content

v2.0.0rc1

Choose a tag to compare

@X-Ryl669 X-Ryl669 released this 20 Mar 18:13
· 24 commits to master since this release

Version 2 is on the way

This took a while to make, but it's finally arriving. The version 2 of the client changes the internal logic to support the last missing feature from the version 1: standard compliant packet retransmission.

For a detailed explanation, see the blog post here.

To sum up the changes, this release:

  • Reworked the event loop and publish cycle so it's now possible to publish packet in your receive callback without resorting to complex "pass the packet to the event loop thread" mechanism. From the user side, this means you don't need a mutex anymore and a multithread shared structure.

  • Adds a smart hybrid ring buffer for storing packets with effective Quality Of Service, in order to automatically resend them upon disconnection and reconnection to the broker happening before they are acknowledged. Since this is rare requirement, the default simply doesn't store anything and packet that aren't acknowledged are lost if disconnection happen. The ring buffer is allocated at client construction and isn't reallocated afterward so, as usual, no memory fragmentation can occur with this client.

  • Add support for disconnection callback (previously, later methods would have returned a Disconnected error) so you can reconnect faster, as soon as the event is detected and no more when you actually use the client.

Full Changelog: v1.0.0rc1...v2.0.0rc1