Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server can define its own Keep Alive in CONNACK #789

Open
Tracked by #695
andsel opened this issue Nov 4, 2023 · 0 comments
Open
Tracked by #695

Server can define its own Keep Alive in CONNACK #789

andsel opened this issue Nov 4, 2023 · 0 comments
Assignees
Labels

Comments

@andsel
Copy link
Collaborator

andsel commented Nov 4, 2023

Allow the Server to specify the value it wishes the Client to use as a keep alive. This allows the Server to set a maximum allowed keepalive and still have the Client honor it.

MQTT5 specification

If the Server sends a Server Keep Alive on the CONNACK packet, the Client MUST use this value instead of the Keep Alive value the Client sent on CONNECT [MQTT-3.2.2-21]. If the Server does not send the Server Keep Alive, the Server MUST use the Keep Alive value set by the Client on CONNECT [MQTT-3.2.2-22]

Implementation notes

The server could be configured, through its config/moquette.conf file, to use a predefined keep alive value (in seconds), to override the one that the clients would transmit. This value is sent back to the the client as Server Keep Alive property in CONNACK.

The name of the setting to be used in the config file is server_keep_alive and could be expressed ad number, implicitly referring to seconds, or using a time specifier, in which case only seconds is permitted.

Examples:

server_keep_alive 10

or

server_keep_alive 10s

While

server_keep_alive 10d

is not permitted

@andsel andsel added the mqtt5 label Nov 4, 2023
@andsel andsel self-assigned this Nov 4, 2023
@andsel andsel changed the title Server can define it's Keep Alive Server can define its own Keep Alive in CONNACK Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant