EMQX
Use Case: Predictive maintenance

Start Pentaho Data Integration
Launch Data Integration:
Publish telemetry to EMQX (MQTT Producer)
Open:
~/Streaming/emqx/solution/tr_mqtt_producer.ktr

This transformation:
generates data for
vehicle_id = 111every 5 secondsadds a timestamp
builds a
messagepayloadpublishes the payload to EMQX using MQTT Producer
Double-click MQTT Producer and confirm these settings:
Connection: points to your broker (for example
tcp://localhost:1883)Client ID: unique on the broker
Topic: note the value. You will reuse it in the consumer.
QoS: choose based on delivery requirements
Message field:
message

Run the transformation.
Validate in EMQX Dashboard:
Open
http://localhost:18083.Go to Clients. Confirm the producer client is connected.
Go to Topics. Confirm message rate on your topic.
Consume and process telemetry (MQTT Consumer)
Open:
~/Streaming/emqx/solution/tr_mqtt_consumer.ktr

Double-click MQTT Consumer and confirm:
Topic matches the producer topic.
Child transformation points to:
Batch has at least one trigger set:
Duration (ms) >
0, orNumber of records >
0

Run the transformation.
Validate in EMQX Dashboard:
Go to Clients. Confirm the consumer client is connected.
Go to Subscriptions. Confirm the client is subscribed to the topic.
Inspect results
Open the child transformation:
~/Streaming/emqx/solution/tr_process_sensor_data.ktr

This transformation:
pulls
messagerecords from the streamadds a timestamp
resolves
sensor_typefilters minor and major alerts
aggregates alerts for reporting
appends results to output files
Open the output files and confirm new rows append:
~/Streaming/emqx/output/major_alert.txt~/Streaming/emqx/output/minor_alert.txt


Last updated
Was this helpful?
