Skip to content

Commit 84dd9af

Browse files
author
Ignacio Van Droogenbroeck
committed
docs: document ARC_MQTT_ENABLED env var to enable the MQTT subsystem
The integrations/mqtt.md quick-start only showed editing arc.toml, which is the wrong path for containerised deployments — edits inside a running container don't survive a restart, leading to confusing "Cannot POST /api/v1/mqtt/subscriptions" errors when the routes are gated on the manager being initialised at startup. - configuration/overview.md: add ARC_MQTT_ENABLED=true to the env-var Features block alongside the other feature toggles. - integrations/mqtt.md: split "Enable MQTT in Arc" into Option A (env var, recommended for Docker/Kubernetes, with docker-compose + docker run snippets) and Option B (arc.toml, with a note about in-container edits not persisting). Add a verification curl + response-shape table covering healthy / disabled-200 / disabled-503 / Cannot-GET so users can self-diagnose.
1 parent f03e61e commit 84dd9af

2 files changed

Lines changed: 39 additions & 2 deletions

File tree

docs/configuration/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ ARC_COMPACTION_ENABLED=true
9999
ARC_DELETE_ENABLED=true
100100
ARC_RETENTION_ENABLED=true
101101
ARC_CONTINUOUS_QUERY_ENABLED=true
102+
ARC_MQTT_ENABLED=true # Enables the MQTT subsystem and API routes
102103

103104
# Ingestion Concurrency (v26.01.1+)
104105
ARC_INGEST_FLUSH_WORKERS=32

docs/integrations/mqtt.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,50 @@ Arc provides native MQTT subscription with dynamic, API-driven configuration. Ma
3636

3737
### 1. Enable MQTT in Arc
3838

39-
Edit `arc.toml`:
39+
MQTT is **disabled by default**. Enable it via either:
40+
41+
**Option A — environment variable (recommended for Docker / Kubernetes):**
42+
43+
```bash
44+
ARC_MQTT_ENABLED=true
45+
```
46+
47+
In `docker-compose.yml`:
48+
49+
```yaml
50+
services:
51+
arc:
52+
environment:
53+
ARC_MQTT_ENABLED: "true"
54+
```
55+
56+
Or with `docker run`:
57+
58+
```bash
59+
docker run -e ARC_MQTT_ENABLED=true ...
60+
```
61+
62+
**Option B — `arc.toml`:**
4063

4164
```toml
4265
[mqtt]
4366
enabled = true
4467
```
4568

46-
Restart Arc to apply the configuration.
69+
Arc looks for `arc.toml` in `.`, `/etc/arc/`, and `$HOME/.arc/`. In containers, editing the file inside a running container does **not** persist across restarts — use the env-var path or mount the file as a volume.
70+
71+
Restart Arc after changing either source. Verify with:
72+
73+
```bash
74+
curl http://localhost:8000/api/v1/mqtt/health
75+
```
76+
77+
| Response | Meaning |
78+
| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
79+
| `200` with `{"status":"healthy", ...}` | MQTT is enabled and running. |
80+
| `200` with `{"status":"disabled","healthy":false}` | MQTT was not enabled at startup. Check `ARC_MQTT_ENABLED` / `[mqtt].enabled` and restart. |
81+
| `503` with `{"error":"MQTT subsystem disabled"}` | Same as above, on older builds. |
82+
| Plaintext `Cannot GET /api/v1/mqtt/health` | Your Arc build pre-dates the MQTT API. Upgrade to a release that includes PR #416 (v26.05.1 or later). |
4783

4884
### 2. Create a Subscription
4985

0 commit comments

Comments
 (0)