@@ -23,34 +23,69 @@ The MQTT input plugin lets Fluent Bit behave as a server. Dispatch some messages
2323
2424Running the following command:
2525
26- ``` bash
27- fluent-bit -i mqtt -t data -o stdout -m ' *'
26+ ``` shell
27+ $ fluent-bit -i mqtt -t data -o stdout -m ' *'
2828```
2929
3030Returns a response like the following:
3131
3232``` text
33- Fluent Bit v1.x.x
34- * Copyright (C) 2019-2020 The Fluent Bit Authors
35- * Copyright (C) 2015-2018 Treasure Data
33+ Fluent Bit v4.0.3
34+ * Copyright (C) 2015-2025 The Fluent Bit Authors
3635* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
3736* https://fluentbit.io
3837
39- [2016/05/20 14:22:52] [ info] starting engine
38+ ______ _ _ ______ _ _ ___ _____
39+ | ___| | | | | ___ (_) | / || _ |
40+ | |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __/ /| || |/' |
41+ | _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| || /| |
42+ | | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /\___ |\ |_/ /
43+ \_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ |_(_)___/
44+
45+
46+ [2025/07/01 14:44:47] [ info] [fluent bit] version=4.0.3, commit=f5f5f3c17d, pid=1
47+ [2025/07/01 14:44:47] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
48+ [2025/07/01 14:44:47] [ info] [simd ] disabled
49+ [2025/07/01 14:44:47] [ info] [cmetrics] version=1.0.3
50+ [2025/07/01 14:44:47] [ info] [ctraces ] version=0.6.6
51+ [2025/07/01 14:44:47] [ info] [input:mem:mem.0] initializing
52+ [2025/07/01 14:44:47] [ info] [input:mem:mem.0] storage_strategy='memory' (memory only)
53+ [2025/07/01 14:44:47] [ info] [sp] stream processor started
54+ [2025/07/01 14:44:47] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
55+ [2025/07/01 14:44:47] [ info] [output:stdout:stdout.0] worker #0 started
4056[0] data: [1463775773, {"topic"=>"some/topic", "key1"=>123, "key2"=>456}]
4157```
4258
4359The following command line will send a message to the MQTT input plugin:
4460
45- ``` bash
46- mosquitto_pub -m ' {"key1": 123, "key2": 456}' -t some/topic
61+ ``` shell
62+ $ mosquitto_pub -m ' {"key1": 123, "key2": 456}' -t some/topic
4763```
4864
4965### Configuration file
5066
51- In your main configuration file append the following ` Input ` and ` Output ` sections:
67+ In your main configuration file append the following:
68+
69+ {% tabs %}
70+ {% tab title="fluent-bit.yaml" %}
71+
72+ ``` yaml
73+ pipeline :
74+ inputs :
75+ - name : mqtt
76+ tag : data
77+ listen : 0.0.0.0
78+ port : 1883
79+
80+ outputs :
81+ - name : stdout
82+ match : ' *'
83+ ` ` `
84+
85+ {% endtab %}
86+ {% tab title="fluent-bit.conf" %}
5287
53- ``` python
88+ ` ` ` text
5489[INPUT]
5590 Name mqtt
5691 Tag data
@@ -61,3 +96,6 @@ In your main configuration file append the following `Input` and `Output` secti
6196 Name stdout
6297 Match *
6398```
99+
100+ {% endtab %}
101+ {% endtabs %}
0 commit comments