Examples Index
Find the right example for your use case:| Example | Route Type | Key Features |
|---|---|---|
| Edge-to-Cloud Sync | MQTT_BRIDGE | TLS, outbound sync |
| Cloud Commands | MQTT_BRIDGE | Inbound direction |
| Multi-Site Network | MQTT_BRIDGE | Multiple mappings |
| MongoDB Sensor Storage | MONGODB | CLEAN query format |
| REST API Integration | REST_API | HTTP requests from MQTT |
| Critical Alerts Email | Template placeholders | |
| OpenSearch Analytics | OPENSEARCH | STORE keyword |
| Complete Integration | Multiple | Combined setup |
MQTT Bridge Examples
Edge-to-Cloud Sensor Sync
This example demonstrates synchronizing sensor data from a local edge device to a cloud broker. Theout direction ensures data flows from your local broker to the cloud, while TLS encryption secures the connection:
Cloud Command Reception
Receive commands from cloud systems and distribute them to local devices. Thein direction means data flows from the remote broker to your local broker:
Multi-Site Synchronization
Connect multiple factory locations to a central broker. This pattern enables enterprise-wide visibility while keeping local operations independent:MongoDB Examples
MongoDB Sensor Storage
Store sensor readings in MongoDB using the CLEAN query format. This example captures all sensor readings and stores them with metadata including the original topic and timestamp:MongoDB Event Logging
Create an event log collection for system events:REST API Examples
REST API Integration
Connect your MQTT broker to external REST APIs. This example calls a weather API when a request arrives on the trigger topic:REST API with Authentication
Call authenticated APIs with headers extracted from the MQTT payload:Email Notification Examples
Critical Alert Notifications
Send emails for critical system alerts. Template placeholders like{value.json.equipment_id} are replaced with values from the MQTT payload:
Dynamic User Notifications
Send to recipients specified in the MQTT payload using{value.json.email}:
Data Storage Examples
OpenSearch Sensor Archive
Index all sensor data for real-time analytics and historical queries:Combined Bridge and Storage
Bridge data from a remote broker and simultaneously store it in OpenSearch using theSTORE keyword:
Complete Integration Example
This comprehensive example combines multiple route types into a complete IoT integration setup. It demonstrates how different routes work together:Pattern Summary
Choose the right route pattern for your scenario:| Scenario | Route Type | Key Configuration |
|---|---|---|
| Edge to Cloud | MQTT_BRIDGE | WITH DIRECTION "out" |
| Cloud Commands | MQTT_BRIDGE | WITH DIRECTION "in" |
| Bidirectional Sync | MQTT_BRIDGE | WITH DIRECTION "both" |
| Document Storage | MONGODB | CLEAN query format |
| Search/Analytics | OPENSEARCH | Index configuration |
| API Integration | REST_API | HTTP method + endpoint |
| Email Alerts | Template + placeholders |

