Skip to content

Releases: eclipse-paho/paho.mqtt.rust

Version 0.9.1

01 Jan 14:10
Compare
Choose a tag to compare

Minor update to provide ways to check the result of a publish without blocking/awaiting the full operation to complete.

  • #101 Token::try_wait() to check for the result of a Token without blocking.
  • #101 A try_publish() function for the AsyncClient and Topic which return a synchronous result that the message was created and queued for transmission successfully.
  • #28 Some instructions for using the "cross" tool for cross-compiling.

Version 0.9.0

29 Dec 19:40
Compare
Choose a tag to compare

Updated coverage to Paho C v1.3.8 with all of its new features and bug fixes, and added some missing MQTT v5 support and examples.

  • Websocket HTTP/HTTPS proxy support
  • Added missing MQTT v5 support:
    • Subscribe and Unsubscribe can now have v5 properties, thus enabling Subscription Identifiers.
  • [Breaking] Persistence defaults to None if no Client ID specified in creation.
  • Ability to specify a path when using File persistence
  • Updated bindings to Paho C v1.3.8
  • Ability to start publishing (queuing) messages before fir first successful connection.
  • New offline buffering options:
    • Ability to start publishing (queuing) messages before first successful connection.
    • Option to delete the oldest messages first from the queue when it fills up.
  • New persistence options:
    • The option to not restore messages from persistence on startup (fresh restart).
    • The option to not persist QoS 0 messages.
  • [#110] Update to futures-timer v3.0
  • [#95] Added Send bounds to ClientPersistence
  • [#92] Vendored SSL with openssl-sys crate (optional)
  • New example apps:
    • sync_consume_v5.rs - An MQTT v5 consumer that uses Subscription ID's to handle incoming messages.
    • ws_publish.rs - Simeple websocket example with optional proxy.

Version 0.8.0 - Async/Await

21 Nov 00:19
Compare
Choose a tag to compare

This release was primarily to add support for Rust async/await, primarily by updating the Token objects to support Futures 0.3.

  • Upgraded Tokens to implement Futures 0.3. (async/await compatible!)
  • std::Error type based on thiserror
  • Added some missing/forgotten MQTT v5 support:
    • Connect and Will properties in connect options
    • Reason code and properties in disconnect options
  • Ability to set additional HTTP headers in a Websocket opening handshake.
  • Added MQTT v5 topic alias capability with an example.
  • Examples using async/await
  • Removed old asynchronous (futures 0.1-style) examples
  • Message and option structs were reimplemented internally with pinned inner data structs.
  • Removed AsyncClientBuilder. Use CreateClientBuilder instead, possibly with new create_client() function.
  • SslOptions using Path and PathBuf for file names in the API instead of String.
  • The reason code returned from the server moved into the ServerResponse struct.
  • Added ConnectResponse as a struct instead of a tuple for the data returned in CONNACK.
  • Upgraded crate to 2018 Edition

Version 0.7.1 - Fix the v0.6 builds

28 Apr 19:50
Compare
Choose a tag to compare

It turned out that the update to the -sys crate in v0.7 was a breaking change.

This just bumps the version numbers to indicate that fact, so as not to break v0.6 builds via crates.io

Version 0.7 - MQTT v5

27 Apr 16:57
Compare
Choose a tag to compare

Full support for MQTT v5, including:

  • Ability to create an MQTT v5 client and request a v5 connection to the server.
  • MQTT v5 Properties (for connect, publish, incoming messages, etc)
  • ReasonCode and better error notifications.
  • [Breaking] Restored the single Token type, getting rid of separate implementations of ConnectToken, SubscribeToken, etc.
  • Subscribe options, such as "No Local," etc.
  • Topic objects can now be used to subscribe.
  • New callback on_disconnect() for when the client receives a disconnect packet from the server, complete with a reason code and properties.
  • Example for a simple chat application (mqttrs_chat) using the v5 "No Local" subscription option. The publisher does not get their own messages echoed back to them.
  • Examples for RPC using v5 Properties for ResponseTopic and CorrelationData:
    • A math RPC service/server (rpc_math_srvr) that performs basic operations on a list of numbers.
    • A math RPC client (rpc_math_cli) that can send requests.

Also:

  • Fix for #48: Sends a None (and exits consumer) on manual disconnect.
  • Fix for #49: Supporting on_connect() callback.
  • Fix for #51: Segfault on subscribe_many() with a single topic.
  • The build now uses the environment variable OPENSSL_ROOT_DIR to help find the SSL libraries in a non-standard install directory.

Note that v0.7 still targets Futures v0.1 and Rust Edition 2015. Support for async/await, and std Future (0.3) will be coming shortly in v0.8.

Version 0.6 - Futures and server responses

12 Oct 15:02
Compare
Choose a tag to compare
  • Futures support:

    • Compatible with the Rust Futures library v0.1
    • Now depends on the crates "futures" (v0.1) and "futures-timer" (v0.1).
    • The Token objects, which are returned by asynchronous calls, now implements the Futures trait, which is mostly compatible with the previous implementation.
    • Incoming messages can be obtained through a Stream from the client, implemented with a futures channel.
    • New examples of a publisher and subscriber implemented with futures.
  • Server Responses

    • There are now several different types of tokens corresponding to different requests for which the server can return a response: ConnectToken, DeliveryToken, SubscribeToken, etc.
    • Tokens now track the type of request and get the server response upon completion. This is the Futures Item type for the token.
    • In particular this is useful for connecting subscribers. The app can now determine if a persistent session is already present, and only needs to subscribe if not.
  • Send and Sync Traits

    • The clients are now marked as Send and Sync
    • The Token types are Send
    • Most of the option types are Send and Sync
    • AsyncClient and Token objects are now just Arc wrappers around inner structs making it easy to clone and pass references around.
  • Internal Cleanup

    • Updated to wrap Paho C v1.3.1 which has a number of important bug fixes.
    • Moved Tokens into their own source file.
    • Consolidated persistence internals into UserPersistence struct.
    • Created a new ResponseOptions struct to manage the details of the C MQTTAsync_responseOptions objects.
    • Cleanup of the AsyncClient implementation.
    • A bad reconnect bug is fixed (Issue #33)

Version 0.5 - WebSocket support

17 Dec 05:32
Compare
Choose a tag to compare

This version:

  • Updated the library to use Paho C v1.3.0
  • Adds WebSocket support (comes for free with C v1.3.0)
  • Example apps can take the URI of a remote host.
  • Cleanup of some docs.