Class MqttProactiveEmitter
- Namespace
- Kuestenlogik.Bowire.Protocol.Mqtt.Mock
- Assembly
- Kuestenlogik.Bowire.Protocol.Mqtt.dll
Proactive emitter for Phase 2f: replays the MQTT publishes captured in a BowireRecording onto an embedded MQTTnet broker on a schedule. No HTTP trigger needed — the scheduler fires as soon as a subscriber is attached (or after the startup-grace timeout, whichever comes first). Subscribers that connect late miss already-fired publishes (retained messages stick around per MQTT semantics).
public sealed class MqttProactiveEmitter : IAsyncDisposable
- Inheritance
-
MqttProactiveEmitter
- Implements
- Inherited Members
Constructors
MqttProactiveEmitter(MqttServer, BowireRecording, double, ILogger, bool, TimeSpan?)
public MqttProactiveEmitter(MqttServer broker, BowireRecording recording, double speed, ILogger logger, bool loop = false, TimeSpan? loopInterval = null)
Parameters
brokerMqttServerThe embedded broker the recording is injected into.
recordingBowireRecordingThe capture whose MQTT steps are replayed.
speeddoubleFrame pacing inside one run:
1.0keeps the captured cadence,0emits every frame immediately.loggerILoggerLogger scoped to the mock server.
loopboolReplay the recording on repeat while the mock is up.
loopIntervalTimeSpan?Explicit cycle length for
loopmode, ornullto pace cycles by the recording's own duration (#708). Zero asks for no pacing at all.
Methods
DisposeAsync()
public ValueTask DisposeAsync()
Returns
Start()
Kick off the schedule on a background task.
public void Start()