MQTT
The MQTT input plugin, allows to retrieve messages/data from MQTT control packets over a TCP connection. The incoming data to receive must be a JSON map.
Configuration Parameters
The plugin supports the following configuration parameters:
Key | Description | Default |
---|---|---|
Listen | Listener network interface. |
|
Port | TCP port where listening for connections. |
|
Payload_Key | Specify the key where the payload key/value will be preserved. | none |
Threaded | Indicates whether to run this input in its own thread. |
|
Getting Started
In order to start listening for MQTT messages, you can run the plugin from the command line or through the configuration file:
Command Line
Since the MQTT input plugin let Fluent Bit behave as a server, we need to dispatch some messages using some MQTT client, in the following example mosquitto tool is being used for the purpose:
The following command line will send a message to the MQTT input plugin:
Configuration File
In your main configuration file append the following Input & Output sections:
Last updated