You can define and send a batch of events to test more complex functional use cases
involving a set of multiple events.
About this task
Follow this procedure to test a set of multiple events.
Procedure
-
Inside
test-data folder, create a data file
multiple-events.txt, containing multiple events.
{ "id": "00001", "timestamp": "2021-10-28T09:05:12.737Z", "status": "ok" }
{ "id": "00002", "timestamp": "2021-10-29T19:05:12.737Z", "status": "ok" }
{ "id": "00003", "timestamp": "2021-11-01T09:00:12.737Z", "status": "error" }
{ "id": "00004", "timestamp": "2021-11-01T10:05:12.737Z", "status": "ok" }
{ "id": "00005", "timestamp": "2021-11-01T11:05:12.737Z", "status": "ok" }
{ "id": "00006", "timestamp": "2021-11-01T12:05:12.737Z", "status": "error" }
{ "id": "00007", "timestamp": "2021-11-01T13:05:12.737Z", "status": "ok" }
{ "id": "00008", "timestamp": "2021-11-01T14:05:12.737Z", "status": "error" }
{ "id": "00009", "timestamp": "2021-11-02T10:05:12.737Z", "status": "ok" }
{ "id": "00010", "timestamp": "2021-11-02T12:05:12.737Z", "status": "ok" }
- Run the following command, keeping a watch on the dashboard you created in the previous
step:
management-cli kafka producer-json --topic="icp4ba-bai-test-topic" --file="./test-data/multiple-events.txt" --batch
Results
While the events are sent, you can see the result in the Business Performance Center updating the dashboard
in real-time.
What to do next
You can now clean all the resources after a deployment. See How to clean a
Processing Application.