Skip to content

Conversation

@ansd
Copy link
Member

@ansd ansd commented Jul 13, 2023

Starting with RabbitMQ 3.13 mqtt.max_session_expiry_interval_seconds (set in seconds) will replace the previous setting mqtt.subscription_ttl.

MQTT 5.0 introduces the Session Expiry Interval
feature which does not only apply to subscribers, but also to publishers.

The new config name mqtt.max_session_expiry_interval_seconds makes it clear that it also applies to publishers.

Prior to this commit, when mqtt.subscription_ttl was set, a warning got logged and the value was ignored. This is dangerous if an operator does not see the warning but relies for example on mqtt.subscription_ttl = infinity to not expire non clean session.

It's safer to make the boot fail if that unsupported config name is still set. A clear error message will be logged:

[error] <0.142.0> Error preparing configuration in phase apply_translations: [error] <0.142.0> - Translation for 'rabbitmq_mqtt.subscription_ttl' found invalid configuration: Since 3.13 mqtt.subscription_ttl (in milliseconds) is unsupported. Use mqtt.max_session_expiry_interval_seconds (in seconds) instead. 

Alternatively, RabbitMQ could translate mqtt.subscription_ttl to mqtt.max_session_expiry_interval_seconds.

However, forcing the new config option sounds the better way to go.

Once we write MQTT 5.0 docs, this change must go into the 3.13 release notes.

This commit also renames max_session_expiry_interval_secs to max_session_expiry_interval_seconds. The latter is clearer to users.

Starting with RabbitMQ 3.13 mqtt.max_session_expiry_interval_seconds (set in seconds) will replace the previous setting mqtt.subscription_ttl. MQTT 5.0 introduces the Session Expiry Interval feature which does not only apply to subscribers, but also to publishers. The new config name mqtt.max_session_expiry_interval_seconds makes it clear that it also applies to publishers. Prior to this commit, when mqtt.subscription_ttl was set, a warning got logged and the value was ignored. This is dangerous if an operator does not see the warning but relies for example on `mqtt.subscription = infinity` to not expire non clean session. It's safer to make the boot fail if that unsupported config name is still set. A clear error message will be logged: ``` [error] <0.142.0> Error preparing configuration in phase apply_translations: [error] <0.142.0> - Translation for 'rabbitmq_mqtt.subscription_ttl' found invalid configuration: Since 3.13 mqtt.subscription_ttl (in milliseconds) is unsupported. Use mqtt.max_session_expiry_interval_seconds (in seconds) instead. ``` Alternatively, RabbitMQ could translate mqtt.subscription_ttl to mqtt.max_session_expiry_interval_seconds. However, forcing the new config option sounds the better way to go. Once we write MQTT 5.0 docs, this change must go into the 3.13 release notes. This commit also renames max_session_expiry_interval_secs to max_session_expiry_interval_seconds. The latter is clearer to users.
@michaelklishin michaelklishin added this to the 3.13.0 milestone Jul 13, 2023
@michaelklishin michaelklishin merged commit 16f7d50 into main Jul 13, 2023
@michaelklishin michaelklishin deleted the session-expiry-interval branch July 13, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants