6.1 MqttPublisher hosted service
Persistent MQTTnet v4 IMqttClient wrapped in a BackgroundService: attempts to connect on StartAsync (logging and continuing on failure) and reconnects on a 5s loop while running. Exposes IsConnected so 6.4 can wire it into /health later. Honors username/password and UseTls from MqttOptions; clean session is disabled. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -151,7 +151,7 @@ Each type lives in `src/FrameProcessor/Domain/`. Tests in `tests/FrameProcessor.
|
||||
|
||||
## Phase 6 — MQTT
|
||||
|
||||
### [ ] 6.1 `MqttPublisher` hosted service
|
||||
### [x] 6.1 `MqttPublisher` hosted service
|
||||
- Singleton `IHostedService` wrapping `IMqttClient` (MQTTnet v4).
|
||||
- `WithReconnectDelay`, `WithCleanSession(false)`, credentials/TLS from `MqttOptions`.
|
||||
- Exposes `bool IsConnected` for `/health`.
|
||||
|
||||
Reference in New Issue
Block a user