Step 1: Create a new streaming pipeline
- Open Mage in your browser.
- Click on ”+ New Pipeline” and select “Streaming”.
- Give your pipeline a name and click “Create”.
Step 2: Add an ActiveMQ data loader
- In your new pipeline, click ”+ Add Block” and select “Data loader”.
- Choose “ActiveMQ” as the data source.
In the data loader block, use the following YAML configuration as a template:
connector_type: 'activemq'
connection_host: 'localhost'
connection_port: 61613
queue_name: 'default'
username: 'admin'
password: 'admin'
Adjust these values according to your ActiveMQ setup:
connection_host
: Your ActiveMQ broker’s hostname or IP address.
connection_port
: The port your ActiveMQ broker is listening on (default STOMP port is 61613).
queue_name
: The name of the queue you want to consume messages from.
username
and password
: Your ActiveMQ authentication credentials.
Ensure that the stomp port on ActiveMQ is open, which is 61613 by default.
Step 4: Additional configuration (optional)
Depending on your specific requirements, you may need to add additional configuration options:
- For SSL/TLS connections:
use_ssl: true
ssl_cert_path: '/path/to/cert.pem'
ssl_key_path: '/path/to/key.pem'
- To set a connection timeout:
connection_timeout: 30 # in seconds
- To control message prefetching:
Step 5: Test your connection
- Save your data loader block.
- Click the “Test” button to verify your connection to ActiveMQ.
- If successful, you should see a sample of messages from your queue.
Responses are generated using AI and may contain mistakes.