@@ -179,6 +179,54 @@ your own sample or edit the sample for custom data.
179179
180180From the repo root, run ` make dummy-bms ` after the local environment is
181181deployed. For direct runs, pass the broker, CSV, and schema paths explicitly.
182+ Authentication options for real clients are covered in
183+ [ authentication.md] ( ../../docs/authentication.md ) ; the local dummy-BMS target
184+ uses the no-auth example profile.
185+
186+ ### Dummy BMS Scenario CSV
187+
188+ Scenario files must use exactly this header:
189+
190+ ``` csv
191+ offset,topic,payload
192+ ```
193+
194+ Each row is one MQTT publish:
195+
196+ - ` offset ` is a Go duration such as ` 0s ` , ` 500ms ` , or ` 2m ` . Offsets must be
197+ non-negative and non-decreasing because they are replayed relative to the
198+ start of each pass.
199+ - ` topic ` must be a concrete topic that matches a BMS AsyncAPI channel. For
200+ BMS-originated sample data, use
201+ ` BMS/v1/PUB/{Value|Metadata}/{objectType}/{pointType}/{tagPath} ` . For
202+ example, ` BMS/v1/PUB/Metadata/Rack/RackPower/site-a/row-1/rack-1/power ` and
203+ ` BMS/v1/PUB/Value/Rack/RackPower/site-a/row-1/rack-1/power ` are valid
204+ concrete topics. Empty segments and MQTT wildcards (` + ` , ` # ` ) are rejected.
205+ - ` payload ` must be JSON and must validate against the BMS AsyncAPI schema for
206+ the selected topic. Any topic parameter fields present in the payload must
207+ match the topic.
208+ - ` {{timestamp_ms}} ` in the payload is replaced at publish time with the current
209+ Unix timestamp in milliseconds.
210+ - ` Metadata ` topics are published retained. ` Value ` topics are live,
211+ non-retained publishes.
212+
213+ The command loops the scenario until interrupted. Add ` --once ` to publish one
214+ pass and exit:
215+
216+ ``` bash
217+ go run ./cmd/dummy-bms \
218+ --broker tcp://127.0.0.1:11883 \
219+ --csv examples/dsx_exemplar.csv \
220+ --schema ../../schema/schema/bms/bms.yaml \
221+ --once
222+ ```
223+
224+ To verify messages while ` make dummy-bms ` is running, subscribe to the forwarded
225+ CSC broker from another terminal:
226+
227+ ``` bash
228+ mosquitto_sub -h 127.0.0.1 -p 11883 -t ' BMS/v1/PUB/#' -v
229+ ```
182230
183231## Development
184232
0 commit comments