Skip to content

Commit

Permalink
NO-JIRA clarify MQTT sub queue clean-up doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jbertram committed Mar 3, 2023
1 parent 1f3745c commit c2a9ec7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions docs/user-manual/en/mqtt.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,18 @@ Web browsers can then connect to `wss://<server>:8883` using a Web Socket to
send and receive MQTT messages.


## Automatic Subscription Clean-up
## Automatic Subscription Clean-up

Sometimes MQTT clients don't clean up their subscriptions. In such situations
the `auto-delete-queues-delay` and `auto-delete-queues-message-count`
address-settings can be used to clean up the abandoned subscription queues.
Sometimes MQTT clients using `CleanSession=false` don't clean up their
subscriptions. In such situations the following address-setting can be used
to clean up the abandoned subscription queues:
```xml
<address-setting match="myMqttAddress">
<auto-delete-created-queues>true</auto-delete-created-queues>
<auto-delete-queues-delay>3600000</auto-delete-queues-delay> <!-- 1 hour delay -->
<auto-delete-queues-message-count>-1</auto-delete-queues-message-count> <!-- doesn't matter how many messages there are -->
</address-setting>
```
However, the MQTT session meta-data is still present in memory and needs to be
cleaned up as well. The URL parameter `defaultMqttSessionExpiryInterval` can be
configured on the MQTT `acceptor` to deal with this situation.
Expand Down

0 comments on commit c2a9ec7

Please sign in to comment.