Description
The MQTT sender plugin forwards 1Gateway messages to a MQTT broker.
Prerequisites
The MQTT sender requires 1Gateway and SDK version 3.2.0.
Installation
Make sure you have the 1gateway zip file that includes the plugin files and valid licences information ready. This file has been provided to you with the installation files.
1 - Login
Login to 1gateway, and make sure you are in "Advanced mode". If this is the first time you log in, the default user and password are both 'admin' (without the quotes).
2 - System Maintenance
Click on the menu icon and choose the option "System maintenance"
3 - Upload file
In the System maintenance view you can either drag and drop the downloaded zip file or select it by clicking the "choose file" button.
Configuration
Open the main menu and click on "New plugin"
Select the plugin you want to configure. Use the Filter field if needed.
Field name | Supported values | Description |
---|
URL | Any string | Configure the connection to the MQTT broker, include protocol and port information |
User | Any string | User name |
Password | Any string | Password |
Default topic | Any string | Define the default topic used when forwarding the message to the broker |
Topic from message | Any string | Set topic by using either a field from the source or the target message defined in a mapping |
Generic sender plugin configuration
The following configuration fields are generic for all sender plugins.
Field name | Supported values | Description |
---|
Process 1Gateway messages (outboud) | Tickbox | If unticked, the plugin doesn't get any messages |
Topics | Formatted string | String in the format: origin_endpoint.message_type.phase To define more than one topic, separate with semicolon (;) For more information on queues, click here. |
Queuename | Any string | Name of the queue in RabbitMQ. |
Durable | Tickbox | If ticked, will save the messages in the queue to disk when 1Gateway is down. |
Prefech | Any integer | How many messages to get from RabbitMQ at a time |
Threads | Any integer | How many threads to run in the sender |
Filter expression | Groovy script | Groovy expression that returns true if the filter has passed or false if it hasn't. If the filter does not pass for a specific message, that message won't get processed by the plugin. For more information on filters, click here. |
See also