Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ driver --> redis --> source --> mosquitto:1883 (source publishes, API key a
are `/api/engine/v2/mqtt/user` and `/mqtt/access`. PlaceOS/local's config names
`mqtt_user`/`mqtt_access`, which 404, so every client is refused there; `e2e/stack/mosquitto.conf`
has the working names.
- **A subscription is sent everything retained under it at once**, and mosquitto drops what
does not fit the client's queue. `mosquitto.conf` sets `max_queued_messages 10000`, as
deployments now do; the default of 1000 cut wide subscriptions short on large sites.
- **Restarting mosquitto empties it** (no persistence). source before v1.22.1 (so
`placeos-2.2610.1`) neither republishes after reconnecting nor retries a broker it could not
reach at startup, so restart source after mosquitto. v1.22.1 (PlaceOS/source#65) does both.
Expand Down
8 changes: 8 additions & 0 deletions e2e/stack/mosquitto.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ auth_opt_jwt_getuser_uri /api/engine/v2/mqtt/user
auth_opt_jwt_aclcheck_uri /api/engine/v2/mqtt/access
auth_opt_jwt_response_mode status
auth_opt_jwt_params_mode form

# A client subscribing is sent every retained message under its filter at
# once, and mosquitto drops whatever does not fit its outgoing queue (1000
# messages by default) without telling it. Large sites retain far more than
# that, so a client subscribing widely (stagehand's hot list, source clearing
# or sweeping retained state) saw only part of it. A client that needs more
# can subscribe more narrowly, or refresh.
max_queued_messages 10000