-
Notifications
You must be signed in to change notification settings - Fork 822
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handled client's receive maximum property to avoid publish flooding (#…
…858) Handle client's receive maximum property to configure the inflight window through the client. The main change contained in this PR is usage of a `sendQuota` in the `MQTTConnection` to keep the inflight zone size instead of `Session`'s `inflightSlots`. The method used to resend inflight messages has been updated to respect the send quota (aka `receive_maximum` property ) expressed by the client on CONNECT message. If the inflight space is bigger than the actual send quota, maybe because the client squeezed it on a reconnection, it partition the inflight to fill up the send quota. The resend of inflight take precedence over queue drain both on processing of QoS1 PUBACK and QoS2 PURBEC. If client connects through MQTT 3 the hardcoded limit (10) is used for inflight zone. If it connects with MQTT5 it reads the `receive_maximum` property or set to default 65535 default value if not specified.
- Loading branch information
Showing
16 changed files
with
309 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.