Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ref:mqtt [2023/01/03 19:23] – updated to reflect current scheme digital man | ref:mqtt [2024/01/12 17:38] (current) – [Servers] Table the server sub-topics digital man | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== MQTT Topic Naming and Payload Scheme ====== |
Synchronet v3.20 can publish and subscribe to message " | Synchronet v3.20 can publish and subscribe to message " | ||
- | Synchronet message topics start with " | ||
- | All message | + | As enabled and configured in [[util: |
+ | |||
+ | < | ||
+ | ╔══════════════════════════════════════╗ | ||
+ | ║ | ||
+ | ╠══════════════════════════════════════╣ | ||
+ | ║ │Enabled | ||
+ | ║ │Broker Address | ||
+ | ║ │Broker Port | ||
+ | ║ │Username | ||
+ | ║ │Password | ||
+ | ║ │Keep-alive | ||
+ | ║ │Protocol Version | ||
+ | ║ │Publish Verbosity | ||
+ | ║ │Publish QOS 0: At most once ║ | ||
+ | ║ │Subscribe QOS 2: Exactly once ║ | ||
+ | ║ │Log Level | ||
+ | ║ │TLS (encryption) | ||
+ | ╚══════════════════════════════════════╝ | ||
+ | </ | ||
+ | |||
+ | ===== Retention ===== | ||
+ | Most Synchronet MQTT messages are published with the //retain// flag enabled. Retained messages published before a client/ | ||
+ | |||
+ | ===== Topics ===== | ||
+ | Synchronet MQTT message | ||
+ | sbbs/MYBBS = My Brand-new BBS | ||
+ | |||
+ | All leaf topics are published as children of the '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | All MQTT messages published by Synchronet | ||
===== Nodes ===== | ===== Nodes ===== | ||
- | BBS terminal server nodes can be monitored and controlled via MQTT. | + | The BBS's [[server:terminal]] server nodes (servicing terminal connections via Telnet, SSH, RLogin, Raw TCP) can be monitored and controlled via MQTT. |
- | Under the sbbs/// | + | Under the '' |
- | | + | |
- | * node2/ | + | |
- | * node3/ | + | |
- | * node4/ | + | |
- | * node_count | + | |
- | Messages | + | In " |
- | * node#/**status** - tab-delimited node status | + | |
- | * node#/ | + | sbbs/ |
- | * node#/**output** - live output to connected-terminal (for spying) | + | sbbs/ |
- | * node#/**input** - keyboard input to inject into connected-node | + | sbbs/ |
- | * node#/**laston** - tab-delimited details of user to last logoff | + | sbbs/ |
+ | |||
+ | |||
+ | Sub-topics of each '' | ||
+ | |||
+ | * sbbs/+/node/+/**status** - tab-delimited node status | ||
+ | * sbbs/+/node/+/ | ||
+ | * sbbs/+/node/+/**output** - live output to connected-terminal (for spying) | ||
+ | |||
+ | Example: | ||
+ | |||
+ | sbbs/ | ||
+ | sbbs/ | ||
+ | |||
+ | ==== Control ==== | ||
+ | |||
+ | Nodes can be controlled by publishing messages to the following topics: | ||
+ | * sbbs/+/node/+/**input** - keyboard input to inject into connected-node | ||
+ | * sbbs/+/node/+/**msg** - send a short text message to the node (message should be terminated with a newline character) | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/+/node/ | ||
+ | * sbbs/ | ||
===== Hosts ===== | ===== Hosts ===== | ||
- | A single Synchronet BBS can be split across multiple instances running on separate inter-networked host computers. Each host will be represented with its own sub-topic of the "sbbs/// | + | A single Synchronet BBS can be split across multiple instances running on separate inter-networked host computers. Each host will be represented with its own sub-topic of the '' |
- | | + | |
- | | + | |
- | | + | |
+ | |||
+ | The public host name (configured in '' | ||
+ | sbbs/ | ||
The control and monitoring of a specific Synchronet instance is done through this "host sub-topic" | The control and monitoring of a specific Synchronet instance is done through this "host sub-topic" | ||
- | Publishing any message to the **recycle** sub-topic of any host topic will initiate a recycling of that host's servers (all of them). | + | ^ Host sub-topic ^ Description |
+ | | recycle | ||
+ | | pause | Publishing any message to the **pause** sub-topic of any host topic will initiate pause that host's servers (all of them), preventing the acceptance of any new incoming client connections. | | ||
+ | | resume | ||
===== Servers ===== | ===== Servers ===== | ||
- | Each Synchronet instance (host) contains the following servers, each represented by its own sub-topic: | + | Each Synchronet instance (host) contains the following servers, each represented by its own sub-topic |
- | * // | + | * sbbs/+/host/+/server/**term** - Terminal Server |
- | * // | + | * sbbs/+/host/+/server/**mail** - Mail Server |
- | * // | + | * sbbs/+/host/+/server/**ftp** - FTP Server |
- | * // | + | * sbbs/+/host/+/server/**web** - Web Server |
- | * // | + | * sbbs/+/host/+/server/**srvc** - Services |
- | Additionally, timed events run by the Terminal Server are represented in the //host///**event/** sub-topic. | + | The //status// of each server is published to its server topic, for example: |
+ | sbbs/MYBBS/host/MYCOMPUTER/server/term = ready 1/5 clients | ||
- | Publishing any message to the **recycle** sub-topic of any server topic will initiate a recycling of that server. | + | The //state// (first field of status) for each server is one of: |
+ | * stopped | ||
+ | * initializing | ||
+ | * ready | ||
+ | * paused | ||
+ | * reloading | ||
+ | * stopping | ||
+ | * disconnected | ||
+ | |||
+ | The server status contains more details/ | ||
+ | |||
+ | ^ Server sub-topic ^ Description | ||
+ | | recycle | ||
+ | | pause | Publishing any message to the **pause** sub-topic of any server topic will prevent that server from accepting any new incoming client connections. | | ||
+ | | resume | ||
Each server topic has the following sub-topics for status reporting: | Each server topic has the following sub-topics for status reporting: | ||
- | * //server/// | + | * sbbs/+/host/+/server/+/ |
- | * //server/// | + | * sbbs/+/host/+/server/+/**state/#** - server |
- | * //server///**max_clients** - maximum number of concurrent clients supported by this server | + | * sbbs/+/host/+/server/+/**client** - current count of connected clients and maximum number of concurrent clients supported by this server |
- | * //server///**served** - total clients | + | * sbbs/+/host/+/server/+/**client/list** - tab-delimited details of all connected |
- | * //server///**error** - last logged error message | + | * sbbs/+/host/+/server/+/**client/ |
- | * //server///**error_count** - total errors logged | + | * sbbs/+/host/+/server/+/**served** - total clients served |
- | * //server/// | + | * sbbs/+/host/+/server/+/**error_count** - total errors logged since server was started |
- | * //server///**client_list** - tab-delimited details of all connected clients, one client per line | + | |
- | ==== Log ==== | + | ==== Logs ==== |
- | Each //server// and "event" | + | Each '' |
Log messages published directly to the " | Log messages published directly to the " | ||
- | * //server/// | + | * sbbs/+/host/+/server/+/**log** |
- | * // | + | * sbbs/+/host/+/server/+/**log/#** |
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | |||
+ | ===== Actions ===== | ||
+ | |||
+ | Client actions are published to the following BBS-wide topics: | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
+ | |||
+ | Fields are tab-delimited and begin with a date/time stamp in ISO-8601 format. | ||
+ | |||
+ | ===== Triggers ===== | ||
+ | |||
+ | The Terminal Server' | ||
+ | * sbbs/ | ||
+ | * sbbs/ | ||
===== See Also ===== | ===== See Also ===== | ||
* [[:ref:|ref index]] | * [[:ref:|ref index]] | ||
+ | * [[: | ||
- | {{tag>}} | + | {{tag>mqtt}} |