From 0b33e0eeb9c431e4251646d23ce5e00152e5a103 Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Thu, 15 Oct 2026 10:29:34 +1100 Subject: [PATCH] chore(e2e): queue up to 10,000 messages per MQTT client, as deployments do Co-Authored-By: Claude Opus 5.5 --- e2e/README.md | 3 +++ e2e/stack/mosquitto.conf | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/e2e/README.md b/e2e/README.md index 608609a572e..9d02f5409c0 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -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. diff --git a/e2e/stack/mosquitto.conf b/e2e/stack/mosquitto.conf index ef3479c4fba..42fda188f96 100644 --- a/e2e/stack/mosquitto.conf +++ b/e2e/stack/mosquitto.conf @@ -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