Skip to content

Commit

Permalink
Merge pull request #794 from eclipse/add-properties
Browse files Browse the repository at this point in the history
Add properties to access Client attributes
  • Loading branch information
PierreF authored Jan 21, 2024
2 parents 35be95d + c713c57 commit 3ec0a98
Show file tree
Hide file tree
Showing 6 changed files with 381 additions and 51 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ v2.0.0 - 2023-xx-xx
* `max_packets` argument in loop(), loop_write() and loop_forever() is removed
* `force` argument in loop_stop() is removed
* method `message_retry_set()` is removed
- Possible breaking change: Add properties to access most Client attribute. Closes #764.
Since this add new properties like `logger`, if a sub-class defined `logger`, the two `logger`
will conflict.
- Add version 2 of user-callback which allow to access MQTTv5 reason code & properties that were
missing from on_publish callback. Also it's more consistent in parameter order or between
MQTTv3 and MQTTv5.
Expand Down
21 changes: 21 additions & 0 deletions migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The list of breaking change (detailed below) are:
* Dropped some deprecated and no used argument or method. If you used them, you can just drop them.
* Improved typing which resulted in few type change. It might no affect you, see below for detail.
* Fixed connect_srv, which changed its signature.
* Added new properties, which could conflict with sub-class

### Versioned the user callbacks

Expand Down Expand Up @@ -218,3 +219,23 @@ for with both paho-mqtt 1.x and 2.0).

connect_srv() didn't took the same argument as connect(). Fixed this, which means the signaure
changed. But since connect_srv was broken in previous version, this should not have any negative impact.

### Added new properties

The Client class added few new properties. If you are using a sub-class of Client and also defined a
attribute, method or properties with the same name, it will conflict.

The added properties are:
* host
* port
* keepalive
* transport
* protocol
* connect_timeout
* username
* password
* max_inflight_messages
* max_queued_messages
* will_topic
* will_payload
* logger
Loading

0 comments on commit 3ec0a98

Please sign in to comment.