Releases: wialon/gmqtt
Releases · wialon/gmqtt
Fix for python3.8
Fix write_data
after connection_close
in python 3.8
Subscriptions stored in client
Client now stores it's subscriptions
on_subscribe
callback signature has changed, argument properties has beed added:on_subscribe(client, mid, qos, properties)
client.subscriptions
- list of subscriptionsclient.get_subscriptions_by_mid(mid)
- get list of subscriptions with certain message identifier. May be useful inon_subscribe
callback in order to handle (un-)successful subscription. Note that afteron_subscribe
is finished, mid is freed and can be used in other messages, so it's also removed from subscriptions.client.get_subscription_by_identifier(subscription_identifier)
- get list of subscriptions with certain subscription identifier. May be useful inon_message
callback.
Async on_message bug fixes
Bug fixes in async on_message
callback. Now it works properly for partial coroutines and optimistic_acknowledgement=true
clients
Fix disconnect packet in MQTT3.1.1
- fixed disconnect packet in MQTT3.1.1 This bug caused unexpected will messages coming after gentle disconnect
- added info about asynchronous
on_message
callback to README
Multiple topics subscriptions
- Multiple topics subscription added:
client.subscribe([gmqtt.Subscription('TEST/+', qos=1), gmqtt.Subscription('TEST', qos=0)],
subscription_identifier=1)
- Fixed resend
QoS > 0
messages - Added
Client.is_connected
property, which tells if connection is alive and CONNACK was received
Code improvements
Removed unnecessary link to current event loop in sync method and etc.
Speed up packets read
Optimized packets read and parse
Asynchronous on message callbacks
- Added support for asynchronous callback messages. Value returned from callback future will be used as reason code in
PUBACK
packet - added method to update client's
_reconnect
flag
UTF-8 encoding in JSON messages
Do not force ASCII in json messsages, use utf-8 encoding
Allow to set a few user properties;
v0.2.1 Multiple user properties in publish (#27)