Flow-control: implemented publish's quota management on the server side.
What does this PR do?
Update QoS1 and QoS2 management, at MQTTConnection level to handle the quota of parallel publishes that the broker receives from a client.
Updates the config classes to store and retrieve the value of receive_maximum setting, and use that value in CONNACK to the client. When the quota is consumed, on next publish of QoS1 and QoS2 the broker sends a DISCONNECT with 0x93 error code and close the connection.
Why is it important/What is the impact to the user?
Permit to the server to impose and respect a maximum parallel publishes it can handle per client, configurable in broker settings file. When the limit is passed it disconnects the client.
Checklist
[x] My code follows the style guidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] I have made corresponding change to the default configuration files (and/or docker env variables)
[x] I have added tests that prove my fix is effective or that my feature works
[x] I have updated the Changelog if it's a feature or a fix that has to be reported
Release notes
Flow-control: implemented publish's quota management on the server side.
What does this PR do?
Update QoS1 and QoS2 management, at
MQTTConnection
level to handle the quota of parallel publishes that the broker receives from a client. Updates the config classes to store and retrieve the value ofreceive_maximum
setting, and use that value inCONNACK
to the client. When the quota is consumed, on next publish of QoS1 and QoS2 the broker sends a DISCONNECT with 0x93 error code and close the connection.Why is it important/What is the impact to the user?
Permit to the server to impose and respect a maximum parallel publishes it can handle per client, configurable in broker settings file. When the limit is passed it disconnects the client.
Checklist
[ ] I have made corresponding changes to the documentationAuthor's Checklist
How to test this PR locally
Related issues