RabbitMQ
Allows for messages to be queued, received, and delivered asynchronously ..
To deploy the 'rabbitmq' container.
cd
cd ~/RabbitMQ
docker compose up -d
Log into RabbitMQ.
Username
guest
Password
guest

Take a look at.
~/Workshop--Data-Integration/Labs/Module 3 - Data Sources/Streaming Data/03 RabbitMQ/sensor_tv_room.py
Execute sensor.py
Ensure you have installed the pika Python AMQP Client Library
Execute sensor_tv_room.py script.
Check that the sensor data is being successfully published to HiveMQ.
Click on Queues & Streams

To get a message, ensure the Ack Mode: Automatic ack

Start Pentaho Data Integration:
Execute sensor.py script.
Log into RabbitMQ Control Center.
User
guest
Password
guest
Click on Queues & Streams.

Open the following transformation:
~/Workshop--Data-Integration/Labs/Module 3 - Data Sources/Streaming Data/03 RabbitMQ/tr_amqp_consumer.ktr
Double click on the AMQP Consumer step.

Setup
Connection
Specify the URI address of the AMQP broker to which this step connects to ingest messages into PDI. For more information see: https://www.rabbitmq.com/uri-spec.html
Queue name
Specify the name of a new AMQP message queue from which this step will ingest messages.
The new queue will be created automatically the first time you run the transformation.
The new queue and its exchange attributes will default to the following properties:
Durable
Non auto-delete
Non-exclusive
Note: If you specify a queue name that already exists on the broker, but the existing queue has parameter settings that differ from these, or if the specified queue has an Exchange type (below) that is different, the transformation will abort.
Exchange name
Specify either a new exchange name or an existing exchange name from which to bind the queue.
If the exchange name does not already exist, it will default to the following properties:
Durable
Non auto-delete
Leave the Exchange name blank to use the DEFAULT as the Exchange type (below) and set the Exchange type to DIRECT. The AMQP Producer step will require a matching blank entry in its Setup tab for the Exchange name.
Routing Keys
Open the following transformation:
~/Workshop--Data-Integration/Labs/Module 3 - Data Sources/Streaming Data/03 RabbitMQ/tr_process_sensor_data.ktr

Double-click the JSON Input step and configure with the following settings.

Open the following files.
~/Project/RabbitMQ/tv_room_sensor.txt

Last updated
Was this helpful?
