kopia lustrzana https://github.com/Yakifo/amqtt
updated documentation
rodzic
47c3efd351
commit
c381c45b64
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue