updated documentation

pull/256/head
Andrew Mirsky 2025-07-07 20:23:31 -04:00
rodzic 47c3efd351
commit c381c45b64
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: A98E67635CDF2C39
5 zmienionych plików z 33 dodań i 6 usunięć

Wyświetl plik

@ -17,7 +17,7 @@
- Communication over TCP and/or websocket, including support for SSL/TLS
- Support QoS 0, QoS 1 and QoS 2 messages flow
- Client auto-reconnection on network lost
- Functionality expansion; plugins included: authentication and `$SYS` topic publishing
- Custom functionality expansion; plugins included: authentication, `$SYS` topic publishing, session persistence
## Installation

Wyświetl plik

@ -111,6 +111,14 @@ class StoredMessage(Base):
class SessionDBPlugin(BasePlugin[BrokerContext]):
"""Plugin to store session information and retained topic messages in the event that the broker terminates abnormally.
Configuration:
- file *(string)* path & filename to store the session db. default: `amqtt.db`
- clear_on_shutdown *(bool)* if the broker shutdowns down normally, don't retain any information. default: `True`
"""
def __init__(self, context: BrokerContext) -> None:
super().__init__(context)
@ -298,7 +306,6 @@ class SessionDBPlugin(BasePlugin[BrokerContext]):
"""Configuration variables."""
file: str | Path = "amqtt.db"
retain_interval: int = 5
clear_on_shutdown: bool = True
def __post_init__(self) -> None:

Wyświetl plik

@ -47,8 +47,6 @@ By default, the `PacketLoggerPlugin` is activated and configured for the clien
```yaml
plugins:
.
.
amqtt.plugins.authentication.AnonymousAuthPlugin:
allow_anonymous: false
```
@ -242,3 +240,25 @@ and `on_mqtt_packet_received`.
plugins:
amqtt.plugins.logging_amqtt.PacketLoggerPlugin:
```
### Session Persistence
`amqtt.plugins.persistence.SessionDBPlugin`
Plugin to store session information and retained topic messages in the event that the broker terminates abnormally.
**Configuration**
- `file` - *(string)* path & filename to store the session db. default: `amqtt.db`
- `clear_on_shutdown` *(bool)* if the broker shutdowns down normally, don't retain any information. default: `True`
```yaml
plugins:
amqtt.plugins.persistence.SessionDBPlugin:
file: 'amqtt.db'
clear_on_shutdown: True
```

Wyświetl plik

@ -10,7 +10,7 @@
- Communication over TCP and/or websocket, including support for SSL/TLS
- Support QoS 0, QoS 1 and QoS 2 messages flow
- Client auto-reconnection on network lost
- Functionality expansion; plugins included: authentication and `$SYS` topic publishing
- Custom functionality expansion; plugins included: authentication, `$SYS` topic publishing, session persistence
## Installation